1234567891011121314151617181920212223242526272829303132333435 |
- '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 StockNeedSchema = {
- title: { type: String, required: true, maxLength: 200 }, // 项目名称
- stock_give: { type: String, required: true, maxLength: 100}, //让出股权
- stock_money: { type: Number, required: true, maxLength: 200 }, // 融资金额
- rz_id: { type: String, required: true, maxLength: 200 }, // 融资轮次id
- persion_name: { type: String, required: true, maxLength: 500 }, //联系人姓名
- persion_phone: { type: String, required: true, maxLength: 500 }, //联系人手机号码
- work_id: { type: String, required: true, maxLength: 200 }, //所属行业ID
- stock_news: { type: String}, //需求详情
- pro_book: { type: String,required: true, maxLength: 200} , //商业规划书(上传文件URL)
- jg_id: { type: String, maxLength: 200 ,default:'0'}, //金融机构ID(非定向默认为:0)
- userid: { type: String, required: true, maxLength: 200},//企业表种的UID
- status: { type: String, maxLength: 200,default:'0'}//0 存在 1 删除
- };
- const schema = new Schema(StockNeedSchema, { toJSON: { virtuals: true } });
- schema.index({ userid: 1 });
- schema.index({ work_id: 1 });
- schema.index({ jg_id: 1 });
- schema.plugin(metaPlugin);
- module.exports = app => {
- const { mongoose } = app;
- return mongoose.model('Stockneed', schema, 'stock_need');
- };
|