compleGlj_glj.js 1002 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Created by Zhong on 2018/3/22.
  3. */
  4. /*补充工料机*/
  5. //补充工料机的组成物可能来自标准工料机和补充工料机
  6. const mongoose = require('mongoose');
  7. const Schema = mongoose.Schema;
  8. /* const comple_gljComponent = new Schema(
  9. {
  10. isStd: Boolean, //组成物里的工料机是否是标准的,否则是补充的
  11. ID: Number,
  12. consumeAmt: String
  13. },
  14. {_id: false},
  15. {versionKey: false}
  16. ); */
  17. //补充工料机跟用户和编办绑定
  18. const comple_glj = new Schema({
  19. userId: String,
  20. compilationId: String,
  21. ID: Number,
  22. code: String,
  23. name: String,
  24. specs: String,
  25. unit: String,
  26. basePrice: String,
  27. priceProperty: {
  28. type: Schema.Types.Mixed,
  29. default: {}
  30. },
  31. gljClass: String,
  32. gljType: Number,
  33. model: Number,
  34. shortName: String,
  35. component: Array,
  36. taxRate: String //税率
  37. }, {versionKey: false});
  38. mongoose.model('complementary_glj_lib', comple_glj, 'complementary_glj_lib');