| Version 1 (modified by , 4 hours ago) ( diff ) |
|---|
Use-case 0005 - Leave a Review
Initiating actor: Pet Owner
Other actors: Pet Sitter
Description: After a booking has successfully finished, the Pet Owner can submit a review about the Pet Sitter. The owner leaves a rating out of 5 and a comment. The system links this review directly to the completed booking.
Scenario:
- Pet Owner goes to their "Past Bookings" page.
- System fetches all bookings that belong to this owner to display on the screen:
SELECT booking_id, date_from, address, status FROM bookings WHERE owner_id = (SELECT user_id FROM users WHERE username = 'owner_bojan') ORDER BY date_from DESC;
- Owner clicks "Leave a Review" on a specific completed booking.
- Owner enters a 5 star rating, types a comment, and clicks submit.
- System creates the review record attached to that exact transaction:
INSERT INTO reviews (rating, comment, booking_id) VALUES ( 5, 'Filip was amazing! Sharka loved her walks.', (SELECT booking_id FROM bookings WHERE address = 'ul. Partizanska br. 10, Skopje' LIMIT 1) );
Note:
See TracWiki
for help on using the wiki.
