= Use-case 0011 - Assign Attendance / Seating = '''Initiating actor:''' Wedding Organizer (Assistant) '''Other actors:''' Bride / Groom (Wedding owner) == Description == The organizer assigns seating details and attendance metadata for guests per event, including table number and role (e.g., Guest, Maid of Honor, Best Man). This data is stored in Attendance. == Scenario == 1. The organizer selects an event. 2. The system lists guests with RSVP info. {{{ SET search_path TO project; SELECT g.guest_id, g.first_name, g.last_name, COALESCE(r.status, 'pending') AS rsvp_status FROM guest g LEFT JOIN event_rsvp r ON r.guest_id = g.guest_id AND r.event_id = :event_id WHERE g.wedding_id = :wedding_id ORDER BY g.last_name, g.first_name; }}} 3. The organizer assigns table number and role. 4. The system saves attendance record. {{{ SET search_path TO project; INSERT INTO attendance(status, table_number, role, guest_id, event_id) VALUES (:status, :table_number, :role, :guest_id, :event_id) RETURNING attendance_id; }}} 5. If an attendance record already exists, the system updates it. {{{ SET search_path TO project; UPDATE attendance SET status = :status, table_number = :table_number, role = :role WHERE guest_id = :guest_id AND event_id = :event_id; }}} 6. The system confirms seating/attendance update.