refactor models to typescript

This commit is contained in:
wancat committed 2024-02-07 10:20:19 +08:00
1 parent 253bd04588
commit ee03b9999e
16 files changed
+3 -1

No files matched your search

+19
View File
@@ -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