UNPKG

flexbiz-server

Version:

Flexible Server

3 lines (2 loc) 832 B
'use strict';const dknphepScheam=new Schema({id_app:{type:String,required:!0,maxlength:1024},tu_ngay:Date,den_ngay:Date,loai_phep:String,loai_nghi:String,so_ngay_nghi:Number,trang_thai:String,ly_do:String,nhan_ban_giao:String,sdt_nhan_ban_giao:String,nguoi_duyet:String,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&&(dknphepScheam.index({id_app:1}),dknphepScheam.index({status:1}),dknphepScheam.index({trang_thai:1}),dknphepScheam.index({user_created:"text",loai_phep:"text",loai_nghi:"text"}),dknphepScheam.index({user_created:1,visible_to:1,visible_to_users:1}));module.exports=mongoose.models.dknphep||mongoose.model("dknphep",dknphepScheam);