29 lines
686 B
JavaScript
29 lines
686 B
JavaScript
import EmberObject from 'ember-object';
|
|
import { alias } from 'ember-computed';
|
|
import bignumber from 'kredits-web/utils/cps/bignumber';
|
|
|
|
export default EmberObject.extend({
|
|
// Contract
|
|
id: bignumber('idRaw', 'toString'),
|
|
creatorAccount: null,
|
|
contributorId: bignumber('contributorIdRaw', 'toString'),
|
|
amount: bignumber('amountRaw', 'toNumber'),
|
|
votesCount: bignumber('votesCountRaw', 'toNumber'),
|
|
votesNeeded: bignumber('votesNeededRaw', 'toNumber'),
|
|
executed: null,
|
|
ipfsHash: null,
|
|
|
|
// Shortcuts
|
|
isExecuted: alias('executed'),
|
|
|
|
// IPFS
|
|
kind: null,
|
|
description: null,
|
|
details: {},
|
|
url: null,
|
|
ipfsData: '',
|
|
|
|
// Relationships
|
|
contributor: null,
|
|
});
|