compleRation_coe.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. 'use strict';
  2. /**
  3. *
  4. *
  5. * @author Zhong
  6. * @date 2018/10/23
  7. * @version
  8. */
  9. /*
  10. * 补充定额库用户新增子目换算
  11. * 用户ID与费用定额ID绑定子目换算
  12. * */
  13. const mongoose = require('mongoose');
  14. const deleteSchema = require('../all_schemas/delete_schema');
  15. const Schema = mongoose.Schema;
  16. const coeSchema = new Schema({
  17. coeType: String, // 系数类型
  18. gljCode: String, //要调整的人材机编码
  19. gljName: String,
  20. operator: String, // 运算符(*、+、-、=)
  21. amount: String, // 调整的量
  22. replaceCode:String,
  23. replaceName:String,
  24. _id: false
  25. });
  26. const coeListSchema = new Schema({
  27. userId: String,
  28. compilationId: String,
  29. ID: Number,
  30. serialNo: Number, //编号
  31. name: String, // 名称
  32. content: String, // 说明
  33. coes: [coeSchema],
  34. deleteInfo: deleteSchema
  35. }, {versionKey: false});
  36. mongoose.model('complementary_ration_coe_list', coeListSchema, 'complementary_ration_coe_list');