stdRation_coe.js 1.5 KB

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