123456789101112131415161718192021222324252627 |
- 'use strict';
- module.exports = app => {
- const mongoose = app.mongoose;
- const Schema = mongoose.Schema;
- const NoticeSchema = new Schema({
- dept1: { type: String },
- dept2: { type: String },
- dept3: { type: String },
- userid: {
- type: Schema.Types.ObjectId,
- ref: 'sysUser',
- },
- deptId: {
- type: Schema.Types.ObjectId,
- ref: 'sysDept',
- },
- level: { type: String },
- title: { type: String },
- content: { type: String },
- createTime: { type: Date, default: Date.now }, // 创建时间
- });
- return mongoose.model('Notice', NoticeSchema, 'notice');
- };
|