| | 1 | = Use-case 0009 - RSVP for Event = |
| | 2 | |
| | 3 | '''Initiating actor:''' Guest |
| | 4 | |
| | 5 | '''Other actors:''' None |
| | 6 | |
| | 7 | == Description == |
| | 8 | An invited guest responds to an invitation for a specific wedding event (accepted/declined/pending). The RSVP is stored in the database for tracking. |
| | 9 | |
| | 10 | == Scenario == |
| | 11 | 1. The guest opens the RSVP invitation. |
| | 12 | 2. The system displays event info and RSVP options. |
| | 13 | 3. The guest selects RSVP status and submits. |
| | 14 | 4. The system saves the RSVP response. |
| | 15 | |
| | 16 | {{{ |
| | 17 | SET search_path TO project; |
| | 18 | |
| | 19 | INSERT INTO event_rsvp(status, response_date, guest_id, event_id) |
| | 20 | VALUES (:status, CURRENT_DATE, :guest_id, :event_id) |
| | 21 | RETURNING response_id; |
| | 22 | }}} |
| | 23 | |
| | 24 | 5. The system confirms RSVP and displays the selected status. |
| | 25 | |
| | 26 | {{{ |
| | 27 | SET search_path TO project; |
| | 28 | |
| | 29 | SELECT response_id, status, response_date |
| | 30 | FROM event_rsvp |
| | 31 | WHERE response_id = :response_id; |
| | 32 | }}} |