| 123456789101112131415161718192021222324252627282930313233 |
- const mongoose = require("mongoose");
- const LectureSchema = new mongoose.Schema({
- course: {
- type: mongoose.Schema.Types.ObjectId,
- ref: "Course",
- required: true
- },
- title: {
- type: String,
- required: true
- },
- video: {
- type: String,
- required: true
- },
- description: {
- type: String,
- required: true,
- },
- documents: [{
- name: String,
- link: String
- }],
- exercises: [String],
- url: String,
- date: {
- type: Date,
- default: new Date()
- }
- });
- module.exports = mongoose.model("Lecture", LectureSchema);
|