diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/cards.js | 24 | ||||
-rw-r--r-- | models/checklists.js | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js index 8fd15488..4a662953 100644 --- a/models/cards.js +++ b/models/cards.js @@ -59,6 +59,10 @@ Cards.attachSchema(new SimpleSchema({ type: [String], optional: true, }, + receivedAt: { + type: Date, + optional: true, + }, startAt: { type: Date, optional: true, @@ -67,6 +71,10 @@ Cards.attachSchema(new SimpleSchema({ type: Date, optional: true, }, + endAt: { + type: Date, + optional: true, + }, spentTime: { type: Number, decimal: true, @@ -271,6 +279,14 @@ Cards.mutations({ return {$unset: {coverId: ''}}; }, + setReceived(receivedAt) { + return {$set: {receivedAt}}; + }, + + unsetReceived() { + return {$unset: {receivedAt: ''}}; + }, + setStart(startAt) { return {$set: {startAt}}; }, @@ -287,6 +303,14 @@ Cards.mutations({ return {$unset: {dueAt: ''}}; }, + setEnd(endAt) { + return {$set: {endAt}}; + }, + + unsetEnd() { + return {$unset: {endAt: ''}}; + }, + setOvertime(isOvertime) { return {$set: {isOvertime}}; }, diff --git a/models/checklists.js b/models/checklists.js index 637e280c..9946f98e 100644 --- a/models/checklists.js +++ b/models/checklists.js @@ -6,6 +6,7 @@ Checklists.attachSchema(new SimpleSchema({ }, title: { type: String, + defaultValue: 'Checklist', }, finishedAt: { type: Date, |