mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
20 lines
420 B
JavaScript
20 lines
420 B
JavaScript
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
|