module.exports = app=>{ const mongoose = app.mongoose; const Schema = mongoose.Schema; const Dist = new Schema({ dictCode: String, dictName: String, description: String, type: Number, dictItems: [{ itemValue: String, itemText: String, // letter: String, sortOrder:String, status:Number, description:String }] },{ collection:'dict' }); return mongoose.model("Dict", Dist); };