'use strict'; module.exports = app => { const mongoose = app.mongoose; const Schema = mongoose.Schema; const ScoreVerificationSchema = new Schema({ dept1: { type: Schema.Types.ObjectId, ref: 'sysDept', }, dept2: { type: Schema.Types.ObjectId, ref: 'sysDept', }, dept3: { type: Schema.Types.ObjectId, ref: 'sysDept', }, dept4: { type: Schema.Types.ObjectId, ref: 'sysDept', }, dept5: { type: Schema.Types.ObjectId, ref: 'sysDept', }, userid: { type: Schema.Types.ObjectId, ref: 'sysUser', }, score: { type: String }, // 兑换积分 money: { type: String }, // 兑换金额 type: { type: String }, // 0 : 微信提现 status: { type: String }, // 审批状态 0:已提交 1:已通过 2:未通过 time: { type: Date, default: Date.now }, }); return mongoose.model('ScoreVerification', ScoreVerificationSchema, 'score_verification'); };