|
@@ -2,10 +2,12 @@
|
|
|
const Schema = require('mongoose').Schema;
|
|
|
const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
|
|
|
const { Secret } = require('naf-framework-mongoose/lib/model/schema');
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+const videos = new Schema({
|
|
|
+ start_time: { type: String, required: true, maxLength: 200 },
|
|
|
+ end_time: { type: String, required: true, maxLength: 200 },
|
|
|
+ url: { type: String, required: true, maxLength: 500 },
|
|
|
+});
|
|
|
|
|
|
const Channel = {
|
|
|
user_id: { type: String, required: false, maxLength: 200 },
|
|
@@ -16,7 +18,7 @@ const Channel = {
|
|
|
sponsor: { type: String, required: false, maxLength: 200 },
|
|
|
organizer: { type: String, required: false, maxLength: 200 },
|
|
|
image_path: { type: String, required: false },
|
|
|
- video_path: { type: String, required: false },
|
|
|
+ videodata: { type: [ videos ], default: [] },
|
|
|
};
|
|
|
const schema = new Schema(Channel, { toJSON: { virtuals: true } });
|
|
|
schema.index({ id: 1 });
|