diff --git a/models/Tags.js b/models/Tags.js new file mode 100644 index 0000000..b4efea3 --- /dev/null +++ b/models/Tags.js @@ -0,0 +1,17 @@ +const mongoose = require("mongoose"); + +const tagsSchema = new mongoose.Schema({ + name: { + type: String, + required: true, + }, + description: { + type: String, + }, + course: { + type: mongoose.Schema.Types.ObjectId, + ref: "Course", + }, +}); + +module.exports = mongoose.model("Tag", tagsSchema);