checklists WIP

This commit is contained in:
Tyler Renelle
2013-12-29 21:10:27 -07:00
parent ea31cc6926
commit 74c905f1e1
7 changed files with 93 additions and 8 deletions
+10 -1
View File
@@ -39,6 +39,13 @@ var HabitSchema = new Schema(
, { _id: false }
);
var checklist = [{
completed:{type:Boolean,'default':false},
text: String,
_id:false,
id: {type:String,'default':shared.uuid}
}];
var DailySchema = new Schema(
_.defaults({
type: {type:String, 'default': 'daily'},
@@ -53,6 +60,7 @@ var DailySchema = new Schema(
s: {type: Boolean, 'default': true},
su: {type: Boolean, 'default': true}
},
checklist:checklist,
streak: {type: Number, 'default': 0}
}, TaskSchema)
, { _id: false }
@@ -62,7 +70,8 @@ var TodoSchema = new Schema(
_.defaults({
type: {type:String, 'default': 'todo'},
completed: {type: Boolean, 'default': false},
date: String // due date for todos // FIXME we're getting parse errors, people have stored as "today" and "3/13". Need to run a migration & put this back to type: Date
date: String, // due date for todos // FIXME we're getting parse errors, people have stored as "today" and "3/13". Need to run a migration & put this back to type: Date
checklist:checklist
}, TaskSchema)
, { _id: false }
);