erDiagram User ||--o{ Event : "creates" User ||--o{ EventManager : "is assigned as" User ||--o{ Guest : "can be linked to" User { uuid id PK string email UK string password_hash string first_name string last_name string phone_number boolean is_active boolean is_superuser json preferences datetime created_at datetime updated_at } EventManager }o--|| Event : "manages" EventManager { uuid id PK uuid user_id FK uuid event_id FK uuid assigned_by FK enum role "OWNER/ADMIN/MODERATOR/VIEWER" boolean can_edit boolean can_invite boolean can_manage_gifts boolean can_send_updates boolean can_view_analytics datetime assigned_at datetime created_at datetime updated_at } Event ||--o{ Guest : "invites" Event ||--o{ GiftItem : "contains" Event ||--o{ EventMedia : "has" Event ||--o{ GiftCategory : "has" Event }o--|| EventTheme : "uses" Event { uuid id PK string title string slug UK string description string location_name string location_address string location_url datetime event_date time event_start_time time event_end_time string timezone datetime rsvp_deadline boolean is_public string access_code uuid created_by FK uuid theme_id FK json custom_theme_settings json additional_info boolean is_active boolean rsvp_enabled boolean gift_registry_enabled boolean updates_enabled integer max_guests_per_invitation string contact_email string contact_phone datetime created_at datetime updated_at } Guest ||--o{ RSVP : "submits" Guest ||--o{ GiftPurchase : "makes" Guest { uuid id PK uuid event_id FK uuid invited_by FK uuid user_id FK "nullable" string full_name string email string phone string invitation_code UK enum status "INVITED/PENDING/CONFIRMED/DECLINED/WAITLISTED/CANCELLED" integer max_additional_guests integer actual_additional_guests datetime invitation_sent_at datetime last_reminded_at datetime response_date string dietary_restrictions string notes json custom_fields boolean is_blocked boolean can_bring_guests datetime created_at datetime updated_at } RSVP { uuid id PK uuid guest_id FK uuid event_id FK enum status "ATTENDING/NOT_ATTENDING/MAYBE" integer number_of_guests string response_message string dietary_requirements json additional_info datetime response_date datetime last_updated datetime created_at datetime updated_at } GiftCategory ||--o{ GiftItem : "groups" GiftCategory { uuid id PK uuid event_id FK uuid created_by FK string name string description string icon string color integer display_order boolean is_visible json custom_fields datetime created_at datetime updated_at } GiftItem ||--o{ GiftPurchase : "tracks" GiftItem { uuid id PK uuid event_id FK uuid added_by FK uuid category_id FK string name string description float price string currency integer quantity_requested integer quantity_received enum status "AVAILABLE/RESERVED/PURCHASED/RECEIVED/REMOVED" enum priority "LOW/MEDIUM/HIGH/MUST_HAVE" string purchase_url string store_name string brand string model string image_url integer display_order boolean is_visible string notes json custom_fields datetime last_status_change datetime created_at datetime updated_at } GiftPurchase { uuid id PK uuid gift_id FK uuid guest_id FK integer quantity datetime purchased_at float purchase_price string purchase_currency string notes } EventTheme ||--o{ Event : "applied to" EventTheme { uuid id PK string name string description string preview_image_url json color_palette json fonts datetime created_at datetime updated_at } EventMedia { uuid id PK uuid event_id FK uuid uploaded_by FK string file_path string original_filename enum media_type "IMAGE/VIDEO/DOCUMENT" string content_type integer file_size enum purpose "BANNER/GALLERY/ATTACHMENT" boolean is_public integer display_order string title string description json metadata datetime created_at datetime updated_at } User ||--o{ EventManager : "has roles" Event ||--o{ RSVP : "receives"