| | 1 | = Use-case 0007 - Book Band = |
| | 2 | |
| | 3 | '''Initiating actor:''' Bride / Groom (Wedding owner) |
| | 4 | |
| | 5 | '''Other actors:''' Wedding Organizer (Assistant) |
| | 6 | |
| | 7 | == Description == |
| | 8 | The user reserves a band for the wedding reception/party. Booking includes time window, status and links the wedding with the band. |
| | 9 | |
| | 10 | == Scenario == |
| | 11 | 1. The user opens the "Bands" section. |
| | 12 | 2. The system lists all bands with details. |
| | 13 | |
| | 14 | {{{ |
| | 15 | SET search_path TO project; |
| | 16 | |
| | 17 | SELECT band_id, band_name, genre, equipment, phone_number, price_per_hour |
| | 18 | FROM band |
| | 19 | ORDER BY band_name; |
| | 20 | }}} |
| | 21 | |
| | 22 | 3. The user selects a band and chooses "Book". |
| | 23 | 4. The system shows booking form: date, start_time, end_time, status. |
| | 24 | 5. The user submits booking. |
| | 25 | 6. The system inserts the band booking. |
| | 26 | |
| | 27 | {{{ |
| | 28 | SET search_path TO project; |
| | 29 | |
| | 30 | INSERT INTO band_booking("date", start_time, end_time, status, band_id, wedding_id) |
| | 31 | VALUES (:date, :start_time, :end_time, :status, :band_id, :wedding_id) |
| | 32 | RETURNING booking_id; |
| | 33 | }}} |
| | 34 | |
| | 35 | 7. The system confirms and shows booking status. |