Moved approval fields to group subdoc

This commit is contained in:
Keith Holliday
2016-10-22 13:07:26 -05:00
parent d798ebadfe
commit 3ec3722038
7 changed files with 26 additions and 21 deletions

View File

@@ -69,15 +69,14 @@ export let TaskSchema = new Schema({
broken: {type: String, enum: ['GROUP_DELETED', 'TASK_DELETED', 'UNSUBSCRIBED']},
assignedUsers: [{type: String, ref: 'User', validate: [validator.isUUID, 'Invalid uuid.']}],
taskId: {type: String, ref: 'Task', validate: [validator.isUUID, 'Invalid uuid.']},
requiresApproval: {type: Boolean, default: false},
approved: {type: Boolean, default: false},
approvedDate: {type: Date},
approvingUser: {type: String, ref: 'User', validate: [validator.isUUID, 'Invalid uuid.']},
approvalRequested: {type: Boolean, default: false},
approvalRequestedDate: {type: Date},
},
requiresApproval: {type: Boolean, default: false},
approved: {type: Boolean, default: false},
approvedDate: {type: Date},
approvingUser: {type: String, ref: 'User', validate: [validator.isUUID, 'Invalid uuid.']},
approvalRequested: {type: Boolean, default: false},
approvalRequestedDate: {type: Date},
reminders: [{
_id: false,
id: {type: String, validate: [validator.isUUID, 'Invalid uuid.'], default: shared.uuid, required: true},