2019-01-18 21:14:33 +00:00
|
|
|
import { action, field } from '@nozbe/watermelondb/decorators'
|
2019-01-18 17:03:17 +00:00
|
|
|
import { LiquidModel } from '../utils/models'
|
2019-01-17 19:18:09 +00:00
|
|
|
|
2019-01-16 20:50:49 +00:00
|
|
|
|
2019-01-18 17:03:17 +00:00
|
|
|
export default class Profiles extends LiquidModel {
|
2019-01-16 20:50:49 +00:00
|
|
|
static table = 'profiles'
|
|
|
|
|
2019-01-17 19:18:09 +00:00
|
|
|
@field('addr') addr
|
|
|
|
@field('canceled') canceled
|
|
|
|
@field('commit_time') commitTime
|
|
|
|
@field('type') type
|
|
|
|
@field('name') name
|
|
|
|
@field('url') url
|
|
|
|
@field('id_profile') idProfile
|
2019-01-18 21:14:33 +00:00
|
|
|
|
|
|
|
@action async markAsCanceled() {
|
|
|
|
await this.update(profile => {
|
|
|
|
profile.canceled = true
|
|
|
|
})
|
|
|
|
}
|
2019-01-17 19:18:09 +00:00
|
|
|
}
|