unit_price_file.js 643 B

12345678910111213141516171819202122232425262728
  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_file';
  11. let modelSchema = {
  12. // 自增id
  13. id: Number,
  14. // 标段id
  15. project_id: {
  16. type: Number,
  17. index: true
  18. },
  19. // 显示名称
  20. name: String,
  21. // 所属用户id
  22. user_id: Number,
  23. // 顶层projectId
  24. root_project_id: Number,
  25. };
  26. let model = mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));
  27. export {model as default, collectionName as collectionName};