stdRation_coe.js 1.0 KB

12345678910111213141516171819202122232425
  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. _id: false
  14. });
  15. const coeListSchema = new Schema({
  16. libID: Number, // 所属定额定ID
  17. ID: Number, // 系数ID(流水号ID)
  18. serialNo: Number, //编号
  19. name: String, // 名称
  20. content: String, // 说明
  21. coes: [coeSchema]
  22. }, {versionKey: false});
  23. mongoose.model('std_ration_lib_coe_list', coeListSchema, 'std_ration_lib_coe_list');