wiki:UseCase05

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:

  1. Pet Owner goes to their "Past Bookings" page.
  2. 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;
    
  3. Owner clicks "Leave a Review" on a specific completed booking.
  4. Owner enters a 5 star rating, types a comment, and clicks submit.
  5. 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) 
    );
    
Last modified 2 hours ago Last modified on 05/08/26 03:07:48
Note: See TracWiki for help on using the wiki.