UNPKG

flexbiz-server

Version:

Flexible Server

6 lines (5 loc) 1.93 kB
'use strict';const kbmlcttttSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},id_rptform:{type:String},stt:{type:Number,required:!0},ma_so:{type:String,required:!0,uppercase:!0},chi_tieu:{type:String,required:!0},chi_tieu2:{type:String},thuyet_minh:{type:String},print:{type:Boolean,default:!0},bold:{type:Boolean,default:!1},phan_loai:{type:String,require:!0,enum:["1","2"]},cach_tinh:{type:String,required:!0,enum:["1","2","3","4","5"]},tk_no:[String],tk_co:[String],giam_tru_no:{type:Boolean, default:!1},giam_tru_co:{type:Boolean,default:!1},cong_thuc:{type:String},bu_tru_cong_no:{type:Boolean,default:!1},cong_thuc_so_kn:{type:String},cong_thuc_so_kn_nt:{type:String},cong_thuc_so_kt:{type:String},cong_thuc_so_kt_nt:{type:String},so_kn:{type:Number},so_kt:{type:Number},so_kn_nt:{type:Number},so_kt_nt:{type:Number},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:""}}); kbmlcttttSchema.validate={cach_tinh:[function($id_app$$,$value$$,$callback$$){"1"==$value$$||"2"==$value$$||"3"==$value$$?$callback$$(!0):$callback$$(!1)},"C\u00e1ch t\u00ednh:1-M\u00e3 s\u1ed1,2-Tinh theo s\u1ed1 ph\u00e1t sinh,3-T\u00ednh theo s\u1ed1 d\u01b0 \u0111\u1ea7u k\u1ef3,4-T\u00ednh theo s\u1ed1 d\u01b0 n\u1ee3 \u0111\u1ea7u k\u1ef3,5-T\u00ednh theo s\u1ed1 d\u01b0 c\u00f3 \u0111\u1ea7u k\u1ef3"],phan_loai:[function($id_app$$,$value$$,$callback$$){"1"==$value$$||"2"==$value$$?$callback$$(!0): $callback$$(!1)},"Ph\u00e2n lo\u1ea1i:1-chi,2-thu"]};(global.configs||{}).createIndexes&&(kbmlcttttSchema.index({id_app:1,stt:1,ma_so:1}),kbmlcttttSchema.index({id_rptform:1}),kbmlcttttSchema.index({ma_so:"text",chi_tieu:"text",chi_tieu2:"text",thuyet_minh:"text"},{name:"kbmlctttt_index_text"}));module.exports=mongoose.models.kbmlctttt||mongoose.model("kbmlctttt",kbmlcttttSchema);