Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Ratings: Order/Show in Search Results

Premium
7 min read

Time for us to talk about rating of the apartments. After their stay, users are asked to rate the property.


Goals of This Lesson

  • Rating DB structure
  • Endpoint for saving the ratings and reviews
  • Show ratings in the search results
  • Order search results by ratings

By the end of this lesson, we will have this in Postman - see the last two fields returned:


Ratings DB Schema

While browsing Booking.com, I found out that only one main number of the user's ratings is actually calculated in the average of the property. Users are asked to rate separately many more features - cleanliness, friendly staff, etc - but we will not implement that. We will simplify it into this:

  • Every booking may have a rating (1-10) and a text-form review comment
  • This rating is attached to the booking for the apartment, but in the search result we need to calculate the average for all the apartments of the property

So, step by step...

The Full Lesson is Only for Premium Members

Want to access all of our courses? (29 h 14 min)

You also get:

54 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

No comments yet…