stdRation_coe.js 1.3 KB

1234567891011121314151617181920212223242526272829303132
  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: {type: Number,index: true}, // 系数ID(流水号ID)
  22. serialNo: Number, //编号
  23. name: String, // 名称
  24. content: String, // 说明
  25. original_code:String, //原人材机编码
  26. option_codes:String, //可选人材机编码
  27. option_list:[Schema.Types.Mixed],//下拉列表选项
  28. coes: [coeSchema]
  29. }, {versionKey: false});
  30. mongoose.model('std_ration_lib_coe_list', coeListSchema, 'std_ration_lib_coe_list');