intelligentFollow.js 1.5 KB

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