|
@@ -1,26 +1,25 @@
|
|
|
'use strict';
|
|
|
const Schema = require('mongoose').Schema;
|
|
|
const moment = require('moment');
|
|
|
-const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
|
|
|
+const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
|
|
|
const { ObjectId } = require('mongoose').Types;
|
|
|
// 审核记录表
|
|
|
-const achieve_verify_record = {
|
|
|
- apply_id: { type: ObjectId }, // 成果申请数据id
|
|
|
+const check_record = {
|
|
|
+ apply_id: { type: String }, // 成果申请数据id
|
|
|
desc: { type: String }, // 本次审核的意见
|
|
|
status: { type: String }, // 本次审核的结果
|
|
|
- verify_id: { type: ObjectId }, // 本次审核人
|
|
|
+ verify_id: { type: String }, // 本次审核人
|
|
|
verify_phone: { type: String }, // 本次审核人的联系电话
|
|
|
verify: { type: String }, // 本次审核人
|
|
|
step: { type: String }, // 初审=>评分=>会审=>资料/发证书
|
|
|
- remark: { type: String, maxLength: 200 },
|
|
|
- create_time: { type: String, default: moment().format('YYYY-MM-DD HH:mm:ss') },
|
|
|
+ remark: { type: String },
|
|
|
};
|
|
|
-const schema = new Schema(achieve_verify_record, { toJSON: { virtuals: true } });
|
|
|
+const schema = new Schema(check_record, { toJSON: { virtuals: true } });
|
|
|
schema.index({ id: 1 });
|
|
|
schema.index({ apply_id: 1 });
|
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
|
schema.plugin(metaPlugin);
|
|
|
module.exports = app => {
|
|
|
const { mongoose } = app;
|
|
|
- return mongoose.model('Achieve_verify_record', schema, 'achieve_verify_record');
|
|
|
+ return mongoose.model('Check_record', schema, 'check_record');
|
|
|
};
|