12345678910111213141516171819202122232425262728293031323334 |
- '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 IntelligentFollowSchema = {
- intelligentId: { type: String, required: true, maxLength: 100 }, // 需求ID
- uid: { type: String, required: true, maxLength: 200 }, // 金融机构ID
- cid: { type: String, required: false, maxLength: 200 }, // 对接产品ID
- accept_time: { type: Number, maxLength: 200 }, // 受理时间(授信时间-创建时间) 期望利率范围(大)
- credit_money: { type: Number, maxLength: 200 }, // 授信额度
- credit_time: { type: Number }, // 授信时间(时间戳)
- creditStatus: { type: String, required: true }, // 0接单 2审批 1已放款 3已拒绝
- uuid: { type: String, maxLength: 200 }, // 客户经理ID
- senhemessage: { type: String, maxLength: 200 }, // 审核信息
- jindiaomessage: { type: String, maxLength: 200 }, // 尽调信息
- refusemessage: { type: String, maxLength: 200 }, // 拒绝原因
- sxcpname: { type: String, maxLength: 200 }, // 授信产品名称
- sxhowlong: { type: String, maxLength: 200 }, // 授信期限
- sxcplilue: { type: String, maxLength: 200 }, // 授信产品利率
- };
- const schema = new Schema(IntelligentFollowSchema, { toJSON: { virtuals: true } });
- schema.index({ userid: 1 });
- schema.plugin(metaPlugin);
- module.exports = app => {
- const { mongoose } = app;
- return mongoose.model('IntelligentFollow', schema, 'intelligent_follow');
- };
|