Changes between Initial Version and Version 1 of UseCase07


Ignore:
Timestamp:
05/08/26 03:11:46 (4 hours ago)
Author:
181201
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase07

    v1 v1  
     1== Use-case 0007 - Accept a Booking
     2
     3'''Initiating actor:''' Pet Sitter
     4
     5'''Other actors:''' Pet Owner
     6
     7'''Description:'''
     8A Pet Sitter logs in and sees they have a new pending booking request. They review the dates, the requested service, and decide to accept the job. The system updates the booking status.
     9
     10'''Scenario:'''
     11 1. Pet Sitter goes to their "Pending Requests" dashboard.
     12 2. System fetches all bookings assigned to them that are still pending:
     13{{{
     14#!sql
     15SELECT booking_id, date_from, date_to, address
     16FROM bookings
     17WHERE sitter_id = (SELECT user_id FROM users WHERE username = 'sitter_filip')
     18  AND status = 'PENDING';
     19}}}
     20 3. Sitter clicks the "Accept Booking" button on a specific request.
     21 4. System updates the status of the booking in the database to CONFIRMED:
     22{{{
     23#!sql
     24UPDATE bookings
     25SET status = 'CONFIRMED'
     26WHERE booking_id = (
     27    SELECT booking_id FROM bookings
     28    WHERE status = 'PENDING'
     29      AND sitter_id = (SELECT user_id FROM users WHERE username = 'sitter_filip')
     30    LIMIT 1
     31);
     32}}}