Open youngkidwarrior opened 3 years ago
Create a schema for Comments that follows the CommentModel.ts structure
CommentModel.ts
{ challenge: { type: Schema.Types.ObjectId, ref: "Challenge", required: true, }, content: { type: String, required: true, }, visible: { type: Boolean, default: true, required: true, }, challengeSeries: { type: Number, required: true, }, creator: { type: Schema.Types.ObjectId, ref: "User", required: true, }, }, { timestamps: true }
Create a schema for Comments that follows the
CommentModel.ts
structure