|
@@ -4,9 +4,10 @@ const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
|
|
|
|
|
|
const ChatSchema = {
|
|
|
roomid: { type: String, required: false, maxLength: 200 }, // 房间名称
|
|
|
- type: { type: String, required: true, maxLength: 64 }, // 类型0、直播1、会议
|
|
|
- content: { type: String, required: true, maxLength: 200 }, // 封面图片
|
|
|
- sendid: { type: String, required: true, maxLength: 200 }, // 发送人id
|
|
|
+ type: { type: String, required: false, maxLength: 64 }, // 类型0、直播1、会议
|
|
|
+ content: { type: String, required: false, maxLength: 200 }, // 封面图片
|
|
|
+ sendid: { type: String, required: false, maxLength: 200 }, // 发送人id
|
|
|
+ sendname: { type: String, required: false, maxLength: 200 }, // 发送人
|
|
|
};
|
|
|
|
|
|
const schema = new Schema(ChatSchema, { toJSON: { virtuals: true } });
|