tFinancingExpert.js 995 B

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