2019-01-21 17:32:42 -05:00
|
|
|
import { action, field, relation } from '@nozbe/watermelondb/decorators'
|
|
|
|
import { LiquidModel } from '../utils/models'
|
|
|
|
|
|
|
|
|
|
|
|
export default class Pledge extends LiquidModel {
|
|
|
|
static table = 'pledges'
|
|
|
|
static associations = {
|
2019-01-22 14:16:58 -05:00
|
|
|
profiles: { type: 'belongs_to', key: 'profile_id' },
|
2019-01-21 17:32:42 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
@field('pledge_id') pledgeId
|
|
|
|
@field('owner_id') owner
|
|
|
|
@field('amount') amount
|
|
|
|
@field('token') token
|
|
|
|
@field('commit_time') commitTime
|
|
|
|
@field('n_delegates') nDelegates
|
|
|
|
@field('intended_project') intendedProject
|
|
|
|
@field('pledge_state') pledgeState
|
2019-01-22 14:16:58 -05:00
|
|
|
@relation('profiles', 'profile_id') profile
|
2019-01-21 17:32:42 -05:00
|
|
|
|
|
|
|
}
|