flexbiz-server
Version:
Flexible Server
3 lines (2 loc) • 644 B
JavaScript
const csphucapSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},ds_nv:[String],ds_bp:[String],phu_cap:[],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&&(csphucapSchema.index({id_app:1,ds_nv:1}),csphucapSchema.index({id_app:1,ds_bp:1}),csphucapSchema.index({id_app:1,status:1}),csphucapSchema.index({id_app:1,user_created:1,visible_to:1,visible_to_users:1}));module.exports=mongoose.models.csphucap||mongoose.model("csphucap",csphucapSchema);