-- Invite token table: one row per invitee so each email has a unique respond link.
-- The respond form adds the member/guests directly to the existing golf and dinner events.
CREATE TABLE IF NOT EXISTS EventsServiceOrderInviteToken (
    id INT AUTO_INCREMENT PRIMARY KEY,
    order_id INT NOT NULL,
    user_id INT NOT NULL,
    token VARCHAR(64) NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    UNIQUE KEY uk_token (token),
    UNIQUE KEY uk_order_user (order_id, user_id),
    INDEX idx_order (order_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
