financefollow.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 FinanceFollowSchema = {
  7. finceType: { type: String, required: true, maxLength: 200 }, //0:债权;1:股权
  8. finceId: { type: String, required: true, maxLength: 100}, //需求ID
  9. userid: { type: String, required: true, maxLength: 200 }, //金融机构ID
  10. uuid: { type: String, maxLength: 200 }, //客户经理ID
  11. accept_time: { type: Number, maxLength: 200 }, //受理时间(授信时间-创建时间) 期望利率范围(大)
  12. credit_money: { type: Number, maxLength: 200 }, //授信额度
  13. credit_time: { type: Number}, //授信时间(时间戳)
  14. orcredit: { type: String, required: true},//是否授信(0:未授信已关注;1:已授信; 2:审核; 3:尽调)
  15. senhemessage: { type: String,maxLength: 200 }, //审核信息
  16. jindiaomessage: { type: String,maxLength: 200 }, //拒绝信息
  17. sxcpname: { type: String,maxLength: 200 }, //授信产品名称
  18. sxhowlong: { type: String,maxLength: 200 }, //授信期限
  19. sxcplilue: { type: String,maxLength: 200 }, //授信产品利率
  20. };
  21. const schema = new Schema(FinanceFollowSchema, { toJSON: { virtuals: true } });
  22. schema.index({ userid: 1 });
  23. schema.plugin(metaPlugin);
  24. module.exports = app => {
  25. const { mongoose } = app;
  26. return mongoose.model('Financefollow', schema, 't_finance_follow');
  27. };