16 lines
432 B
TypeScript
16 lines
432 B
TypeScript
import db from '../db';
|
|
import mongoose from 'mongoose';
|
|
|
|
const HelpSchema = new mongoose.Schema({
|
|
key: {type: String, index: {unique: true}},
|
|
level: String,
|
|
text: String
|
|
}, {minimize: false});
|
|
|
|
// changelog query helper
|
|
HelpSchema.query.log = function <Q extends mongoose.DocumentQuery<any, any>> (req) {
|
|
db.log(req, this);
|
|
return this;
|
|
}
|
|
|
|
export default mongoose.model<any, mongoose.Model<any, any>>('help', HelpSchema); |