12345678910111213141516171819202122 |
- 'use strict';
- const Schema = require('mongoose').Schema;
- const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
- // 专家申请审核表
- const ExpertsauditSchema = {
- expert_id: { type: String, required: true, maxLength: 500 }, // 专家ID
- expertname: { type: String, required: false, maxLength: 500 }, // 专家姓名
- userid: { type: String, required: true, maxLength: 500 }, // 申请人ID
- username: { type: String, required: false, maxLength: 500 }, // 申请人名称
- description: { type: String, required: false }, // 说明
- status: { type: String, required: true, maxLength: 500 }, // 交易状态,0-发起交易,1-交易中,2-交易成功,3-交易取消
- };
- const schema = new Schema(ExpertsauditSchema, { toJSON: { virtuals: true } });
- schema.index({ id: 1 });
- schema.plugin(metaPlugin);
- module.exports = app => {
- const { mongoose } = app;
- return mongoose.model('Expertsaudit', schema, 'experts_audit');
- };
|