unit_price.js 802 B

123456789101112131415161718192021222324252627282930313233343536373839
  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 = 'unit_price';
  11. let modelSchema = {
  12. // 自增ID
  13. id: Number,
  14. // 项目id
  15. project_id: Number,
  16. // 标段id
  17. tender_id: Number,
  18. // 基价单价
  19. base_price: String,
  20. // 市场单价
  21. market_price: String,
  22. // 编码
  23. code: String,
  24. // 名称
  25. name: String,
  26. // 规格型号
  27. specs: {
  28. type: String,
  29. default: ''
  30. },
  31. // 单位
  32. unit: String,
  33. // 类型
  34. type: Number,
  35. };
  36. let model = mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));
  37. export {model as default, collectionName as collectionName};