engineering_lib.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. * 计价规则数据结构
  3. *
  4. * @author CaiAoLin
  5. * @date 2017/8/31
  6. * @version
  7. */
  8. import mongoose from "mongoose";
  9. let Schema = mongoose.Schema;
  10. let collectionName = 'engineering_lib';
  11. let modelSchema = {
  12. // 标准清单
  13. bill_lib: {
  14. type: Schema.Types.Mixed,
  15. default: []
  16. },
  17. // 定额库
  18. ration_lib: {
  19. type: Schema.Types.Mixed,
  20. default: []
  21. },
  22. // 工料机库
  23. glj_lib: {
  24. type: Schema.Types.Mixed,
  25. default: []
  26. },
  27. // 列设置
  28. main_tree_col: {
  29. type: Schema.Types.Mixed,
  30. default: {
  31. "emptyRows":3,
  32. "headRows":0,
  33. "treeCol": 0,
  34. "headRowHeight":[],
  35. "cols":[]
  36. }
  37. },
  38. // 费率标准库
  39. fee_lib: {
  40. type: Schema.Types.Mixed,
  41. default: []
  42. },
  43. //设置人材机显示列
  44. glj_col:{
  45. showAdjustPrice:Boolean//是否显示调整价列
  46. }
  47. };
  48. mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));