summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/cards.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js
index 84fbb6c2..9e7d58c8 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -56,6 +56,14 @@ Cards.attachSchema(new SimpleSchema({
type: [String],
optional: true,
},
+ startAt: {
+ type: Date,
+ optional: true,
+ },
+ dueAt: {
+ type: Date,
+ optional: true,
+ },
// XXX Should probably be called `authorId`. Is it even needed since we have
// the `members` field?
userId: {
@@ -207,6 +215,22 @@ Cards.mutations({
unsetCover() {
return { $unset: { coverId: '' }};
},
+
+ setStart(startAt) {
+ return { $set: { startAt }};
+ },
+
+ unsetStart() {
+ return { $unset: { startAt: '' }};
+ },
+
+ setDue(dueAt) {
+ return { $set: { dueAt }};
+ },
+
+ unsetDue() {
+ return { $unset: { dueAt: '' }};
+ },
});
if (Meteor.isServer) {