WIP(teams): can do To Do's

This commit is contained in:
SabreCat
2022-01-28 17:14:33 -06:00
parent eaa5f821a4
commit 9e527f4f35
8 changed files with 125 additions and 73 deletions

View File

@@ -133,16 +133,14 @@ export const TaskSchema = new Schema({
// key is assigned UUID, with
// { assignedDate: Date,
// assigningUsername: '@username',
// completed: Boolean }
// completed: Boolean,
// completedDate: Date }
},
taskId: { $type: String, ref: 'Task', validate: [v => validator.isUUID(v), 'Invalid uuid for group task.'] },
sharedCompletion: {
$type: String, default: 'singleCompletion', // legacy data
},
managerNotes: { $type: String },
completedBy: {
$type: Schema.Types.Mixed,
default: () => ({}), // { 'UUID': Date }
userId: { $type: String, ref: 'User', validate: [v => validator.isUUID(v), 'Invalid uuid for task completing user.'] },
date: { $type: Date },
},
},