Skip to content

Create Review.js#2

Open
smita-samanta wants to merge 1 commit into
TutorFast:masterfrom
smita-samanta:patch-2
Open

Create Review.js#2
smita-samanta wants to merge 1 commit into
TutorFast:masterfrom
smita-samanta:patch-2

Conversation

@smita-samanta
Copy link
Copy Markdown

Added Review schema

Copy link
Copy Markdown
Member

@Alex-Aralis Alex-Aralis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a Review Field to store a text review?

Comment thread src/models/Review.js
required: true,
},

userRating: [{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for array.

Comment thread src/models/Review.js
}],

ratingNumber: [Number],
ratingSum: {type: Number, default: 0},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for sum here

Comment thread src/models/Review.js
},

userRating: [{
reviewedName: {type: String, default: ''},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

names can be retrieved from the reviewer and reviewee models, no need to store them directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants