engineering_lib.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. billsGuidance_lib: {
  29. type: Schema.Types.Mixed,
  30. default: []
  31. },
  32. // 列设置
  33. main_tree_col: {
  34. type: Schema.Types.Mixed,
  35. default: {
  36. emptyRows: 3,
  37. headRows: 0,
  38. treeCol: 0,
  39. headRowHeight: [],
  40. cols:[]
  41. }
  42. },
  43. // 费率标准库
  44. fee_lib: {
  45. type: Schema.Types.Mixed,
  46. default: []
  47. },
  48. // 人工系数标准库
  49. artificial_lib: {
  50. type: Schema.Types.Mixed,
  51. default: []
  52. },
  53. // 计算程序标准库
  54. program_lib: {
  55. type: Schema.Types.Mixed,
  56. default: []
  57. },
  58. //设置人材机显示列
  59. glj_col:{
  60. showAdjustPrice:Boolean//是否显示调整价列
  61. }
  62. };
  63. mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));