unit_price_file.js 658 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * 具体单价数据结构
  3. *
  4. * @author CaiAoLin
  5. * @date 2017/6/29
  6. * @version
  7. */
  8. import mongoose from "mongoose";
  9. let deleteSchema = require('../all_schemas/delete_schema');
  10. let Schema = mongoose.Schema;
  11. let collectionName = 'unit_price_file';
  12. let modelSchema = {
  13. // 自增id
  14. id: Number,
  15. // 标段id
  16. project_id: {
  17. type: Number,
  18. index: true
  19. },
  20. // 显示名称
  21. name: String,
  22. // 所属用户id
  23. user_id: String,
  24. // 顶层projectId
  25. root_project_id: Number,
  26. deleteInfo: deleteSchema
  27. };
  28. mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));