CREATE TABLE public.session_participants
(
    id integer NOT NULL DEFAULT nextval('session_participants_id_seq'::regclass),
    session_id integer NOT NULL,
    participant_type participant_type NOT NULL,
    partner_id bigint,
    email text NOT NULL,
    full_name text NOT NULL,
    breakout_room character varying(100),
    zoom_registrant_id character varying(100),
    zoom_join_url text,
    attended boolean DEFAULT false,
    zoom_joined_at timestamp with time zone,
    zoom_left_at timestamp with time zone,
    zoom_duration_min integer,
    CONSTRAINT session_participants_partner_id_fkey FOREIGN KEY (partner_id) REFERENCES partners(partner_id),
    CONSTRAINT session_participants_session_id_fkey FOREIGN KEY (session_id) REFERENCES sessions(session_id) ON DELETE CASCADE,
    CONSTRAINT session_participants_pkey PRIMARY KEY (id),
    CONSTRAINT session_participants_session_id_email_key UNIQUE (session_id, email)
);
