-
|
We could add functionality for rating and reviewing products, either as an addition to the existing Catalog service or as a standalone service. Each review could contain:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
For me extending the catalog will be more reasonable in this case, because the suggested features are closely related to the products. The catalog has two entities right now: Products and Categories. We could add Ratings and Comments as well. A rating field should be added to every product and when a new rating is added to the database, the individual rating of the product will be updated, so we are not forced to calculate the rating on every request. The user should be able to fetch his own rating and only be able to create one per product. For the comments, they will be linked to the product in a one to many relationship and will support upvote functionality. Based on the upvote count we will sort the comments. Upvotes have the same relationship to comments as ratings to products. This may required them to be seperated entities. |
Beta Was this translation helpful? Give feedback.
For me extending the catalog will be more reasonable in this case, because the suggested features are closely related to the products. The catalog has two entities right now: Products and Categories. We could add Ratings and Comments as well.
A rating field should be added to every product and when a new rating is added to the database, the individual rating of the product will be updated, so we are not forced to calculate the rating on every request. The user should be able to fetch his own rating and only be able to create one per product.
For the comments, they will be linked to the product in a one to many relationship and will support upvote functionality. Based on the upvote count w…