std_calc_program.js 572 B

123456789101112131415161718192021222324
  1. /**
  2. * 计算程序标准库数据模型
  3. *
  4. * @author CaiAoLin
  5. * @date 2017/10/23
  6. * @version
  7. */
  8. import mongoose from "mongoose";
  9. let Schema = mongoose.Schema;
  10. let collectionName = 'std_calc_programs';
  11. let modelSchema = {
  12. // 自增id
  13. ID: Number,
  14. // 所在地
  15. region: String,
  16. // 标准名称
  17. libName: String,
  18. // 模板数据
  19. templates: Schema.Types.Mixed
  20. };
  21. let model = mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));
  22. export {model as default, collectionName as collectionName};