mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 11:30:13 +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,19 @@
|
||||
import { Schema } from 'mongoose'
|
||||
import conditionSchema from './condition.js'
|
||||
import responseSchema from './response.js'
|
||||
import hintSchema from './hint.js'
|
||||
|
||||
const commandResponderSchema = new Schema({
|
||||
condition: {
|
||||
type: conditionSchema,
|
||||
required: false,
|
||||
},
|
||||
responses: {
|
||||
type: [responseSchema],
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
|
||||
commandResponderSchema.add(hintSchema)
|
||||
|
||||
export default commandResponderSchema
|
||||
Reference in new issue
Block a user