UNPKG

kpiplus

Version:

KPI+

1 lines 1.41 kB
var validAccount=require("../libs/validator-account"),kbmlcttttSchema=new Schema({id_app:{type:String,required:!0},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},cach_tinh:{type:String,required:!0},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(t,e,n){n("1"==e||"2"==e||"3"==e)},"Cách tính:1-Mã số,2-Tinh theo số phát sinh,3-Tính theo số dư đầu kỳ,4-Tính theo số dư nợ đầu kỳ,5-Tính theo số dư có đầu kỳ"],phan_loai:[function(t,e,n){n("1"==e||"2"==e)},"Phân loại:1-chi,2-thu"]},kbmlcttttSchema.index({id_app:1,stt:1,ma_so:1}),module.exports=mongoose.model("kbmlctttt",kbmlcttttSchema);