glj.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**
  2. * 工料机数据模型
  3. *
  4. * @author CaiAoLin
  5. * @date 2017/6/29
  6. * @version
  7. */
  8. import mongoose from "mongoose";
  9. let Schema = mongoose.Schema;
  10. let collectionName = 'glj_list';
  11. let modelSchema = {
  12. // 自增id
  13. id: Number,
  14. // 工料机总库ID
  15. glj_repository_id: Number,
  16. // 标段ID
  17. project_id: Number,
  18. // 编码
  19. code: String,
  20. // 名称
  21. name: String,
  22. // 是否暂估 (0为否 1为是)
  23. is_evaluate: {
  24. type: Number,
  25. default: 0
  26. },
  27. // 供货方式
  28. supply: {
  29. type: String,
  30. default: ''
  31. },
  32. // 甲供数量
  33. supply_quantity: {
  34. type: Number,
  35. default: 0
  36. },
  37. // 交货方式
  38. delivery: {
  39. type: String,
  40. default: ''
  41. },
  42. // 送达地点
  43. delivery_address: {
  44. type: String,
  45. default: ''
  46. },
  47. // 不调价
  48. is_adjust_price: {
  49. type: Number,
  50. default: 0
  51. },
  52. // 调整系数
  53. adjustment: {
  54. type: Number,
  55. default: 1
  56. },
  57. // 显示调整基价
  58. adjust_price: String,
  59. // 显示关联单价文件的字段
  60. unit_price: Schema.Types.Mixed
  61. };
  62. let model = mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false}));
  63. export { model as default, collectionName as collectionName} ;