UNPKG

flexbiz-server

Version:

Flexible Server

4 lines (3 loc) 1.04 kB
'use strict';const gt_hspbScheam=new Schema({id_app:{type:String,required:!0,maxlength:1024},nam:{type:Number,required:!0},thang:{type:Number,required:!0},ma_dvcs:{type:String,maxlength:1024},ma_sp:{type:String,required:!0,uppercase:!0,maxlength:1024},ma_yt:{type:String,uppercase:!0,maxlength:1024},ma_bp:{type:String,uppercase:!0,maxlength:32},id_lenhsx:{type:String,maxlength:1024},he_so:{type:Number,default:0},dieu_chinh_slsx:{type:Boolean},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&&(gt_hspbScheam.index({id_app:1,nam:1,thang:1,ma_dvcs:1,ma_sp:1,ma_yt:1,ma_bp:1},{name:"gt_hspb_index_1"}),gt_hspbScheam.index({id_lenhsx:1}),gt_hspbScheam.index({ma_sp:"text"}),gt_hspbScheam.index({status:1}),gt_hspbScheam.index({user_created:1,visible_to:1,visible_to_users:1})); module.exports=mongoose.models.gt_hspb||mongoose.model("gt_hspb",gt_hspbScheam);