/** * Created by Zhong on 2018/3/22. */ /*定额库编辑器-附注条件*/ const mongoose = require('mongoose'); const Schema = mongoose.Schema; const coeSchema = new Schema({ coeType: String, // 系数类型,指作用范围: // 单个(如:111量0.001)、人工类、材料类、机械类、全部(如:定额×0.925)。 gljID: Number, // 要调整的工料机ID(当coeType=0时有效) operator: String, // 运算符(*、+、-、=) amount: String, // 调整的量 gljCode: String, gljName: String, replaceCode: String, replaceName: String, _id: false }); const coeListSchema = new Schema({ libID: Number, // 所属定额定ID ID: Number, // 系数ID(流水号ID) serialNo: Number, //编号 actualVal: Number, // 实际值 maxVal: Number, // 最大值 minVal: Number, // 最小值 name: String, // 名称 content: String, // 说明 original_code: String, //原人材机编码 option_codes: String, //可选人材机编码 option_list: [Schema.Types.Mixed],//下拉列表选项 coes: [coeSchema] }, { versionKey: false }); mongoose.model('std_ration_lib_coe_list', coeListSchema, 'std_ration_lib_coe_list'); mongoose.model('std_ration_lib_coe_list_backup', coeListSchema, 'std_ration_lib_coe_list_backup');