| | 1 | = Use-case 0005 - Create Wedding Events = |
| | 2 | |
| | 3 | '''Initiating actor:''' Bride / Groom (Wedding owner) |
| | 4 | |
| | 5 | '''Other actors:''' Wedding Organizer (Assistant) |
| | 6 | |
| | 7 | == Description == |
| | 8 | The user creates schedule events for the wedding, such as a church ceremony, reception or party. Each event belongs to a wedding and contains date/time information and status. |
| | 9 | |
| | 10 | == Scenario == |
| | 11 | 1. The user opens the wedding timeline/events section. |
| | 12 | 2. The system lists existing events for the wedding. |
| | 13 | |
| | 14 | {{{ |
| | 15 | SET search_path TO project; |
| | 16 | |
| | 17 | SELECT event_id, event_type, "date", start_time, end_time, status |
| | 18 | FROM event |
| | 19 | WHERE wedding_id = :wedding_id |
| | 20 | ORDER BY "date", start_time; |
| | 21 | }}} |
| | 22 | |
| | 23 | 3. The user selects "Add Event". |
| | 24 | 4. The system displays a form: event_type, date, start_time, end_time, status. |
| | 25 | 5. The user submits event data. |
| | 26 | 6. The system inserts the event into the database. |
| | 27 | |
| | 28 | {{{ |
| | 29 | SET search_path TO project; |
| | 30 | |
| | 31 | INSERT INTO event(event_type, "date", start_time, end_time, status, wedding_id) |
| | 32 | VALUES (:event_type, :date, :start_time, :end_time, :status, :wedding_id) |
| | 33 | RETURNING event_id; |
| | 34 | }}} |
| | 35 | |
| | 36 | 7. The system confirms and shows the event list updated. |