/** * 计算程序标准库数据模型 * * @author CaiAoLin * @date 2017/10/23 * @version */ import mongoose from "mongoose"; let Schema = mongoose.Schema; let collectionName = 'std_calc_programs'; let modelSchema = { // 自增id ID: Number, // 所在地 region: String, // 标准名称 libName: String, //后台选择计算程序时展示的名称,在用户新建时看不到这个名称 displayName:String, // 编办id compilationId: { type: String, index: true }, // 模板数据 templates: Schema.Types.Mixed }; let model = mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName})); export {model as default, collectionName as collectionName};