mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
feat: refactor quest models
+ separate stage and exception + reuse commandResponder
This commit is contained in:
1 parent
b41e67ee0b
commit
bb968706ad
10 files changed
+146
-94
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { Schema } from 'mongoose'
|
||||
import commandResponderSchema from './commandResponder.js'
|
||||
import stageExceptionSchema from './stageException.js'
|
||||
import requirementSchema from './requirement.js'
|
||||
|
||||
const stageSchema = new Schema({
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
task: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
exceptions: {
|
||||
type: [stageExceptionSchema],
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
|
||||
stageSchema.add(commandResponderSchema)
|
||||
stageSchema.add(requirementSchema)
|
||||
|
||||
export default stageSchema
|
||||
Reference in new issue
Block a user