scoreVerificationModel.js 994 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. 'use strict';
  2. module.exports = app => {
  3. const mongoose = app.mongoose;
  4. const Schema = mongoose.Schema;
  5. const ScoreVerificationSchema = new Schema({
  6. dept1: {
  7. type: Schema.Types.ObjectId,
  8. ref: 'sysDept',
  9. },
  10. dept2: {
  11. type: Schema.Types.ObjectId,
  12. ref: 'sysDept',
  13. },
  14. dept3: {
  15. type: Schema.Types.ObjectId,
  16. ref: 'sysDept',
  17. },
  18. dept4: {
  19. type: Schema.Types.ObjectId,
  20. ref: 'sysDept',
  21. },
  22. dept5: {
  23. type: Schema.Types.ObjectId,
  24. ref: 'sysDept',
  25. },
  26. userid: {
  27. type: Schema.Types.ObjectId,
  28. ref: 'sysUser',
  29. },
  30. score: { type: String }, // 兑换积分
  31. money: { type: String }, // 兑换金额
  32. type: { type: String }, // 0 : 微信提现
  33. status: { type: String }, // 审批状态 0:已提交 1:已通过 2:未通过
  34. time: { type: Date, default: Date.now },
  35. });
  36. return mongoose.model('ScoreVerification', ScoreVerificationSchema, 'score_verification');
  37. };