lrf 2 年之前
父節點
當前提交
d80c66e82c
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/model/user/notice.js

+ 2 - 2
app/model/user/notice.js

@@ -7,7 +7,7 @@ const notice = {
   customer: { type: String, required: true, zh: '用户', ref: 'User.User' }, //
   time: { type: String, required: false, zh: '发送时间' }, //
   content: { type: String, required: false, zh: '内容' }, //
-  status: { type: String, required: false, zh: '状态' }, // 字典:notice_status
+  status: { type: String, required: false, default: '0', zh: '状态' }, // 字典:notice_status
 };
 const schema = new Schema(notice, { toJSON: { getters: true, virtuals: true } });
 schema.index({ id: 1 });
@@ -17,7 +17,7 @@ schema.index({ status: 1 });
 
 schema.plugin(metaPlugin);
 
-module.exports = app => {
+module.exports = (app) => {
   const { mongoose } = app;
   return mongoose.model('Notice', schema, 'notice');
 };