Skip to content

Commit

Permalink
Merge pull request #28 from TaleLin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
vanoneang committed Nov 12, 2019
2 parents b79f02b + 7d20e0a commit 81bb59e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions lib/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ export let InfoCrudMixin = {
paranoid: true,
getterMethods: {
createTime() {
return new Date().getTime();
// @ts-ignore
return new Date(this.getDataValue('create_time')).getTime();
},
updateTime() {
return new Date().getTime();
// @ts-ignore
return new Date(this.getDataValue('update_time')).getTime();
}
}
}
Expand Down Expand Up @@ -101,10 +103,12 @@ export let UserInterface = {
return this.getDataValue('active') === UserActive.ACTIVE;
},
createTime() {
return new Date().getTime();
// @ts-ignore
return new Date(this.getDataValue('create_time')).getTime();
},
updateTime() {
return new Date().getTime();
// @ts-ignore
return new Date(this.getDataValue('update_time')).getTime();
}
}
}
Expand Down Expand Up @@ -202,7 +206,8 @@ export let LogInterface = {
updatedAt: false,
getterMethods: {
time() {
return new Date().getTime();
// @ts-ignore
return new Date(this.getDataValue('time')).getTime();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lin-mizar",
"version": "0.2.1",
"version": "0.2.2",
"description": "The core library of Lin CMS",
"main": "lin/index.js",
"scripts": {
Expand Down

0 comments on commit 81bb59e

Please sign in to comment.