Skip to content

Conversation

@smita-samanta
Copy link

Added Review schema

Copy link
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?

required: true,
},

userRating: [{
Copy link
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.

}],

ratingNumber: [Number],
ratingSum: {type: Number, default: 0},
Copy link
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

},

userRating: [{
reviewedName: {type: String, default: ''},
Copy link
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