Skip to content

Commit

Permalink
Merge pull request #96 from AVtheking/wallet
Browse files Browse the repository at this point in the history
added timestamps to reiview
  • Loading branch information
AVtheking authored Nov 26, 2023
2 parents 83fa1f2 + cc5d264 commit cf53f02
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions models/review.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
const mongoose = require("mongoose");
const reviewSchema = new mongoose.Schema({
user: {
type: mongoose.Schema.Types.ObjectId,
ref: "User",
const reviewSchema = new mongoose.Schema(
{
user: {
type: mongoose.Schema.Types.ObjectId,
ref: "User",
},

rating: {
type: String,
// required: true,
},
comment: {
type: String,
// required: true,
},
},

rating: {
type: String,
// required: true,
},
comment: {
type: String,
// required: true,
},
});
{
timestamps: true,
}
);
module.exports = reviewSchema;
// Path: models/course.js
// Path: models/course.js

0 comments on commit cf53f02

Please sign in to comment.