12345678910111213141516171819202122232425 |
- 'use strict';
- const Schema = require('mongoose').Schema;
- const moment = require('moment');
- const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
- const { ObjectId } = require('mongoose').Types;
- // 审核记录表
- const check_record = {
- apply_id: { type: String }, // 成果申请数据id
- desc: { type: String }, // 本次审核的意见
- status: { type: String }, // 本次审核的结果
- verify_id: { type: String }, // 本次审核人
- verify_phone: { type: String }, // 本次审核人的联系电话
- verify: { type: String }, // 本次审核人
- step: { type: String }, // 初审=>评分=>会审=>资料/发证书
- remark: { type: String },
- };
- 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('CheckRecord', schema, 'checkRecord');
- };
|