readNoticeModel.js 457 B

12345678910111213141516171819202122
  1. 'use strict';
  2. module.exports = app => {
  3. const mongoose = app.mongoose;
  4. const Schema = mongoose.Schema;
  5. const readNoticeSchema = new Schema({
  6. userid: {
  7. type: Schema.Types.ObjectId,
  8. ref: 'sysUser',
  9. },
  10. noticeId: {
  11. type: Schema.Types.ObjectId,
  12. ref: 'Notice',
  13. },
  14. createTime: { type: Date, default: Date.now }, // 创建时间
  15. });
  16. return mongoose.model('readNotice', readNoticeSchema, 'read_notice');
  17. };