Skip to content

Commit

Permalink
add tags model
Browse files Browse the repository at this point in the history
  • Loading branch information
amitamrutiya committed Oct 27, 2023
1 parent 82d2889 commit c1d5e41
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions models/Tags.js
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit c1d5e41

Please sign in to comment.