flexbiz-server
Version:
Flexible Server
3 lines (2 loc) • 758 B
JavaScript
;const cddiemScheam=new Schema({id_app:{type:String,required:!0,maxlength:1024},nam:{type:Number,required:!0},ma_dvcs:{type:String,maxlength:1024},email:{type:String,required:!0,lowercase:!0,maxlength:128,trim:!0},ton00:{type:Number,default:0},kc_yn:{type:Boolean,default:!1},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&&(cddiemScheam.index({id_app:1,nam:1,ma_dvcs:1,email:1}),cddiemScheam.index({email:"text"}),cddiemScheam.index({status:1}),cddiemScheam.index({user_created:1}));module.exports=mongoose.models.cddiem||mongoose.model("cddiem",cddiemScheam);