Changes between Initial Version and Version 1 of UseCase14


Ignore:
Timestamp:
05/08/26 03:22:06 (3 hours ago)
Author:
181201
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase14

    v1 v1  
     1== Use-case 0014 - Cancel a Pending Booking
     2
     3'''Initiating actor:''' Pet Owner
     4
     5'''Other actors:''' None
     6
     7'''Description:'''
     8An owner decides they no longer need a sitter and cancels a pending booking request before the sitter accepts it or before payment is made.
     9
     10'''Scenario:'''
     11 1. Pet Owner navigates to their "My Bookings" page.
     12 2. System fetches the owner's current pending bookings:
     13{{{
     14#!sql
     15SELECT booking_id, date_from, address, status
     16FROM bookings
     17WHERE owner_id = (SELECT user_id FROM users WHERE username = 'owner_bojan')
     18  AND status = 'PENDING';
     19}}}
     20 3. Owner clicks the "Cancel Request" button.
     21 4. System updates the booking status:
     22{{{
     23#!sql
     24UPDATE bookings
     25SET status = 'CANCELLED'
     26WHERE booking_id = (
     27    SELECT booking_id FROM bookings
     28    WHERE status = 'PENDING'
     29      AND owner_id = (SELECT user_id FROM users WHERE username = 'owner_bojan')
     30    LIMIT 1
     31);
     32}}}