feat: combine task with stage

This commit is contained in:
wancat committed 2023-09-01 14:56:28 +08:00
1 parent de8d49aea3
commit dd7829b3e9
8 files changed
+127 -54

No files matched your search

+16 -1
View File
@@ -14,6 +14,21 @@ nodeSchema.add({
children: [nodeSchema],
})
const taskSchema = new Schema({
id: {
type: String,
required: true,
},
name: {
type: String,
required: true,
},
completed: {
type: Boolean,
default: false,
},
})
const Session = model(
'Session',
new Schema(
@@ -39,7 +54,7 @@ const Session = model(
default: Date.now,
required: true,
},
completed: [String],
tasks: [taskSchema],
hints: [String],
graph: {
type: nodeSchema,