flexbiz-server
Version:
Flexible Server
3 lines (2 loc) • 826 B
JavaScript
;const dmloaitsSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},ma_loai_ts:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ten_loai_ts:{type:String,required:!0,maxlength:1024},status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""}});
(global.configs||{}).createIndexes&&(dmloaitsSchema.index({id_app:1,ma_loai_ts:1},{unique:!0}),dmloaitsSchema.index({ten_loai_ts:1}),dmloaitsSchema.index({ma_loai_ts:"text",ten_loai_ts:"text"},{name:"dmloaits_index_text"}),dmloaitsSchema.index({status:1}),dmloaitsSchema.index({user_created:1,visible_to:1,visible_to_users:1}));module.exports=mongoose.models.dmloaits||mongoose.model("dmloaits",dmloaitsSchema);