Design a review system for retailer
User should be able to add review text for a product
User should be able to provide overall rating for the product
Users should be able to see the summary of ratings
Users should be able to review different features of the product and rate them separately
Users should be able to add images of the product which is being reviewed Users should be able to filter reviews based on the below
- My reviews
- Get By product
- Get reviews by feature
- Top rated reviews
- Reviews by date Asc and Desc
- Get certified reviews
- Get reviews having images
Model:
@startuml
class User{
id,
name,
username,
password
}
class Order{
userId,
itemsOrderMap
purchaseDate
}
class userItemOrder{
orderId
itemId,
reviewList
reviewStatus
reviewCertified
reviewDate
}
enum reviewType{
size, color, quality, packaging
}
class review{
reviewType
description
imagelink
rating
}
class Item{
id,
name,
description,
images,
}
enum ReviewState {
MODERATION_SUCCESS,
MODERATION_PENDING,
MODERATION_FAILED
}
enum ReviewSentiment {
POSITIVE,
CRITICAL,
DETAILED,
GENERAL
}
@endumlUserService{ addUser(); blackListUser();
}
OrderService{
}
ReviewService{
certifyReview(reviewId);
List
}