1234567891011121314151617181920212223 |
- 'use strict';
- const Schema = require('mongoose').Schema;
- const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
- // 企业查询信息表
- const CompanysearchSchema = {
- userid: { type: String, required: false, maxLength: 200 }, // 关联企业用户id
- company_name: { type: String, required: false, maxLength: 200 }, // 企业名称
- searchinfo: { type: String, select: true }, // 查询条件
- create_time: { type: String, required: false, maxLength: 20 }, // 查询时间
- result_info: { type: String, required: false }, // 查询结果
- type: { type: String, required: false, maxLength: 20 }, // 认证状态,0-债权,1-股权
- };
- const schema = new Schema(CompanysearchSchema, { toJSON: { virtuals: true } });
- schema.index({ id: 1 });
- schema.index({ uid: 1 });
- schema.plugin(metaPlugin);
- module.exports = app => {
- const { mongoose } = app;
- return mongoose.model('Companysearch', schema, 'company_search');
- };
|