修改fund模型

This commit is contained in:
chaosBreaking
2019-10-02 23:04:16 +08:00
parent 3921ba9e0d
commit ef66042e49

View File

@@ -8,11 +8,16 @@ const DayLong = 24 * 60 * 60 * 1000;
*/
class Fund {
constructor (data) {
const { amount, blockNumber, hash } = data;
const { amount, blockNumber, hash, blockHash, from, to, timeStamp, value } = data;
this.amount = +amount;
this.from = from;
this.to = to;
this.value = value;
this.timeStamp = timeStamp;
this.status = 0;
this.blockNumber = blockNumber;
this.blockHash = hash;
this.blockHash = blockHash;
this.hash = hash;
const now = new Date();
const exp = calExpirePeriod();
this.createdAt = now.toISOString();