1234567891011121314151617181920212223242526 |
- 'use strict';
- const Schema = require('mongoose').Schema;
- const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
- const {Secret} = require('naf-framework-mongoose/lib/model/schema');
- // 融资专家
- const TFinancingExpertSchema = {
- name: {type: String, required: true},//姓名
- gender: {type: String, required: true},//性别
- company: {type: String, required: false},//单位
- job: {type: String, required: false},//职务
- work_history: {type: String, required: true},//从事财政/金融类工作经历
- result: {type: String, required: true},//曾获荣誉或融资成果
- field: {type: String, required: false},//擅长领域
- image: {type: String, required: true},//图片
- };
- const schema = new Schema(TFinancingExpertSchema, {toJSON: {virtuals: true}});
- schema.index({id: 1});
- schema.plugin(metaPlugin);
- module.exports = app => {
- const {mongoose} = app;
- return mongoose.model('TFinancingExpert', schema, 't_financing_expert');
- };
|