unit_price.js 779 B

123456789101112131415161718192021222324252627282930313233343536
  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. // 基价单价
  15. base_price: String,
  16. // 市场单价
  17. market_price: String,
  18. // 编码
  19. code: String,
  20. // 名称
  21. name: String,
  22. // 规格型号
  23. specs: {
  24. type: String,
  25. default: ''
  26. },
  27. // 单位
  28. unit: String,
  29. // 类型
  30. type: Number,
  31. // 单价文件表id
  32. unit_price_file_id: Number,
  33. };
  34. let model = mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));
  35. export {model as default, collectionName as collectionName};