'use strict'; module.exports = app => { const mongoose = app.mongoose; const Schema = mongoose.Schema; const readNoticeSchema = new Schema({ userid: { type: Schema.Types.ObjectId, ref: 'sysUser', }, noticeId: { type: Schema.Types.ObjectId, ref: 'Notice', }, createTime: { type: Date, default: Date.now }, // 创建时间 }); return mongoose.model('readNotice', readNoticeSchema, 'read_notice'); };