123456789101112131415161718192021222324252627 |
- '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 ApplyMmoneySchema = {
- qyid: { type: String, required: true, maxLength: 100}, //企业ID(企业用户的UID)
- jgid: { type: String, required: true,maxLength: 200 }, //金融机构ID
- mid: { type: String, required: true,maxLength: 200 }, //理财产品ID
- status: { type: String, maxLength: 200,default:'0'},//0-未关注,1-已关注,2-下架
- };
- const schema = new Schema(ApplyMmoneySchema, { toJSON: { virtuals: true } });
- schema.index({ qyid: 1 });
- schema.index({ mid: 1 });
- schema.plugin(metaPlugin);
- module.exports = app => {
- const { mongoose } = app;
- return mongoose.model('Applymmoney', schema, 'apply_mmoney');
- };
|