|
@@ -0,0 +1,21 @@
|
|
|
+'use strict';
|
|
|
+const Schema = require('mongoose').Schema;
|
|
|
+const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
|
|
|
+// 视频会议表
|
|
|
+const VideomeetSchema = {
|
|
|
+ title: { type: String, required: true, maxLength: 500 }, // 标题
|
|
|
+ brief: { type: String, required: false, maxLength: 500 }, // 标题简介
|
|
|
+ orgin: { type: String, required: false, maxLength: 200 }, // 来源
|
|
|
+ create_time: { type: String, required: false, maxLength: 200 }, // 发布时间
|
|
|
+ picture: { type: String, required: false }, // 视频路径
|
|
|
+ content: { type: String, required: false }, // 正文
|
|
|
+};
|
|
|
+
|
|
|
+const schema = new Schema(VideomeetSchema, { toJSON: { virtuals: true } });
|
|
|
+schema.index({ id: 1 });
|
|
|
+schema.plugin(metaPlugin);
|
|
|
+
|
|
|
+module.exports = app => {
|
|
|
+ const { mongoose } = app;
|
|
|
+ return mongoose.model('Videomeet', schema, 'videomeet');
|
|
|
+};
|