flexbiz-server
Version:
Flexible Server
4 lines (3 loc) • 1.03 kB
JavaScript
;const ecomcategoriesScheam=new Schema({id_app:{type:String,required:!0,maxlength:1024},status:{type:Boolean,default:!0},ma_danh_muc:String,ten_danh_muc:String,ma_nganh_hang:String,danh_muc_me:String,sysorder:String,bac:{type:Number},loai_nh:{type:Number,default:1},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&&(ecomcategoriesScheam.index({id_app:1}),ecomcategoriesScheam.index({status:1}),ecomcategoriesScheam.index({ma_danh_muc:1}),ecomcategoriesScheam.index({ten_danh_muc:1}),ecomcategoriesScheam.index({ma_nganh_hang:1}),ecomcategoriesScheam.index({danh_muc_me:1}),ecomcategoriesScheam.index({sysorder:1}),ecomcategoriesScheam.index({bac:1}),ecomcategoriesScheam.index({loai_nh:1}),ecomcategoriesScheam.index({user_created:1,visible_to:1,visible_to_users:1}));
module.exports=mongoose.models.ecomcategories||mongoose.model("ecomcategories",ecomcategoriesScheam);