1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- 'use strict';
- module.exports = app => {
- const mongoose = app.mongoose;
- const Schema = mongoose.Schema;
- const UrgencySchema = 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',
- },
- visitId: { // 探访记录id
- type: Schema.Types.ObjectId,
- ref: 'Visit',
- },
- managerid: { // 村管理员id
- type: Schema.Types.ObjectId,
- ref: 'sysUser',
- },
- managerName: { type: String }, // 管理员
- userid: { // 探访员id
- type: Schema.Types.ObjectId,
- ref: 'sysUser',
- },
- userName: { type: String }, // 探访员
- infoId: { type: Schema.Types.ObjectId }, // 老人Id
- oldName: { type: String }, // 老人信息
- createTime: { type: Date, default: Date.now }, // 探访时间
- status: { type: String, default: '0' }, // 状态,默认为0-未审阅,1-已处理,2-不处理
- content: { type: String }, // 处理内容
- mode: { type: Array }, // 处理方式
- });
- return mongoose.model('UrgencyNotice', UrgencySchema, 'urgency_notice');
- };
|