/**
 * Aether Unified Type Definitions (Frontend)
 * Standardized 2026-01-08 to align with Backend V3 exports and Dexie local storage patterns.
 */

/**
 * Base properties shared by almost all Aether objects.
 */
export interface ae_BaseObj {
    id: string; // Primary key (maps to [obj_type]_id_random)

    code?: string | null;
    name?: string;
    short_name?: string;
    description?: string | null;

    enable?: boolean | null;
    hide?: boolean | null;
    archive?: boolean;
    archive_on?: string | Date;

    priority?: boolean | null;
    sort?: number | null;
    group?: string | null;
    notes?: string | null;

    created_on?: string | Date | null;
    updated_on?: string | Date | null;

    // Standard frontend computed sort fields
    tmp_sort_1?: string | null;
    tmp_sort_2?: string | null;
    tmp_sort_3?: string | null;
}

/**
 * Account - Core client account
 * Related Files:
 * - src/lib/ae_core/ae_core_functions.ts (API)
 * - src/routes/core/accounts/[account_id]/+page.svelte (View)
 * - src/routes/core/accounts/ae_comp__account_search.svelte (Search)
 */
export interface ae_Account extends ae_BaseObj {
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"

    account_cfg?: ae_AccountCfg;
}

/**
 * AccountCfg - Configuration settings for an account
 */
export interface ae_AccountCfg {
    id: string;
    account_id_random: string; // NO LONGER USE "_random"

    modules_enabled?: any;
    default_no_reply_email?: string;
    default_no_reply_name?: string;

    post_rules?: string;
    post_comment_rules?: string;

    created_on: string | Date;
    updated_on: string | Date;
}

/**
 * Site - A website or application instance
 */
export interface ae_Site extends ae_BaseObj {
    site_id: string;
    site_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"

    url_root?: string;
    site_cfg_json?: any;

    restrict_access?: boolean;
    access_key?: string;

    logo_path?: string;
    logo_bg_color?: string;
    background_image_path?: string;
    background_bg_color?: string;

    title?: string;
    tagline?: string;
}

/**
 * Site_Domain - A domain name mapped to a site
 */
export interface ae_SiteDomain extends ae_BaseObj {
    site_domain_id: string;
    site_domain_id_random: string; // NO LONGER USE "_random"
    site_id: string;
    site_id_random: string; // NO LONGER USE "_random"
    account_id?: string;
    account_id_random?: string; // NO LONGER USE "_random"

    fqdn: string;
    is_primary?: boolean;
    redirect_to_primary?: boolean;

    access_key?: string;

    // Joined fields for bootstrap lookup
    account_code?: string;
    account_name?: string;
    header_image_path?: string;
    style_href?: string;
    google_tracking_id?: string;
    access_code_kv_json?: any;
    cfg_json?: any;
    site_domain_access_key?: string;
}

/**
 * Journal - A collection of entries
 */
/**
 * Journal - A container for journal entries
 */
export interface ae_Journal extends ae_BaseObj {
    journal_id: string;
    journal_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"
    person_id?: string;
    person_id_random?: string; // NO LONGER USE "_random"

    for_type?: string;
    for_id?: string;
    for_id_random?: string; // NO LONGER USE "_random"

    type_code?: string;
    tags?: string;

    summary?: string;
    outline?: string;

    start_datetime?: string | Date;
    end_datetime?: string | Date;
    timezone?: string;

    passcode?: string;
    passcode_timeout?: number;
    private_passcode?: string;

    cfg_json?: any;
    data_json?: any;
    meta_json?: any;

    // SQL View fields
    journal_entry_count?: number;
    file_count?: number;
}

/**
 * JournalEntry - A discrete piece of content within a journal
 */
export interface ae_JournalEntry extends ae_BaseObj {
    journal_entry_id: string;
    // journal_entry_id_random: string; // NO LONGER USE "_random"
    journal_id: string;
    // journal_id_random: string; // NO LONGER USE "_random"

    person_id?: string;
    person_id_random?: string; // NO LONGER USE "_random"

    template?: boolean;

    journal_entry_type?: string;
    activity_code?: string;
    category_code?: string;
    type_code?: string;
    topic_code?: string;
    tags?: string;

    public?: boolean;
    private?: boolean;
    personal?: boolean;
    professional?: boolean;

    summary?: string;
    outline?: string;

    content?: string;
    content_md_html?: string;
    content_html?: string;
    content_json?: any;
    content_encrypted?: string;

    history?: string;
    history_md_html?: string;
    history_encrypted?: string;

    passcode_hash?: string;

    start_datetime?: string | Date;
    end_datetime?: string | Date;
    timezone?: string;
    seconds?: number;

    location?: string;
    latitude?: number;
    longitude?: number;

    billable?: boolean;
    bill_to?: string;
    bill_rate?: number;

    // Attached files/media
    linked_li_json?: any[];
    hosted_file_obj_li?: any[];
    upload_complete?: boolean;
    billable_minutes?: number;

    alert?: boolean;
    alert_msg?: string;

    data_json?: any;
    meta_json?: any;

    // SQL View fields
    journal_code?: string;
    journal_name?: string;
    file_count?: number;
}

export type ae_JournalEntryDraft = Omit<
    Partial<ae_JournalEntry>,
    | 'journal_entry_id'
    | 'journal_id'
    | 'name'
    | 'summary'
    | 'content'
    | 'content_md_html'
    | 'content_encrypted'
    | 'history'
    | 'history_encrypted'
> & {
    journal_entry_id?: string;
    journal_id?: string;
    name?: string | null;
    summary?: string | null;
    content?: string | null;
    content_md_html?: string | null;
    content_encrypted?: string | null;
    history?: string | null;
    history_encrypted?: string | null;
    [key: string]: unknown;
};

/**
 * Person - A human entity
 */
export interface ae_Person extends ae_BaseObj {
    person_id: string;
    person_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"

    user_id?: string;
    user_id_random?: string; // NO LONGER USE "_random"

    prefix?: string;
    title_names?: string;
    given_name?: string;
    middle_name?: string;
    family_name?: string;
    suffix?: string;
    designations?: string;

    full_name?: string;
    last_first_name?: string;
    informal_name?: string;
    preferred_display_name?: string;

    professional_title?: string;
    affiliations?: string;

    primary_email?: string;
    email?: string;
    phone?: string;

    birth_date?: string | Date;
    gender_name?: string;

    tagline?: string;

    allow_auth_key?: boolean;
    passcode?: string;

    data_json?: any;
}

/**
 * User - A login entity with permissions
 * Related Files:
 * - src/lib/ae_core/ae_core_functions.ts (API)
 * - src/routes/core/users/[user_id]/+page.svelte (View)
 * - src/routes/core/users/ae_comp__user_search.svelte (Search)
 */
export interface ae_User extends ae_BaseObj {
    user_id: string;
    user_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"
    person_id?: string;
    person_id_random?: string; // NO LONGER USE "_random"

    username: string;
    email?: string;

    // Permissions (Maps to $ae_loc logic)
    super: boolean;
    manager: boolean;
    administrator: boolean;
    public: boolean;

    status_name?: string;
    logged_in_on?: string | Date;
    last_activity_on?: string | Date;

    user_role_list?: ae_UserRole[];
}

/**
 * UserRole - Specific access levels for a user
 */
export interface ae_UserRole {
    id: string;
    user_id_random: string; // NO LONGER USE "_random"

    for_type?: string;
    for_id_random?: string; // NO LONGER USE "_random"

    code?: string;
    name?: string;
    enable: boolean;

    created_on: string | Date;
    updated_on: string | Date;
}

/**
 * Address - Geographic location data
 */
export interface ae_Address extends ae_BaseObj {
    address_id: string;
    address_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"

    for_type?: string;
    for_id_random?: string; // NO LONGER USE "_random"

    attention_to?: string;
    organization_name?: string;

    line_1: string;
    line_2?: string;
    line_3?: string;
    city: string;
    state_province?: string;
    postal_code?: string;
    country?: string;
    country_name?: string;

    timezone?: string;
    latitude?: string;
    longitude?: string;
}

/**
 * Contact - Electronic communication details (Phone, Email, Web)
 */
export interface ae_Contact extends ae_BaseObj {
    contact_id: string;
    contact_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"

    address_id_random?: string; // NO LONGER USE "_random"
    for_type?: string;
    for_id_random?: string; // NO LONGER USE "_random"

    title?: string;
    tagline?: string;

    email?: string;
    phone_mobile?: string;
    phone_office?: string;
    website_url?: string;

    facebook_url?: string;
    instagram_url?: string;
    linkedin_url?: string;
}

/**
 * ActivityLog - System audit trail
 */
export interface ae_ActivityLog extends ae_BaseObj {
    activity_log_id: string;
    activity_log_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"

    person_id_random?: string;
    user_id_random?: string;

    external_client_id?: string;
    source?: string;
    url_root?: string;
    url_full_path?: string;
    url_params?: string;

    object_type?: string;
    object_id_random?: string;

    action: string;
    action_on_type?: string;
    action_on_id_random?: string;

    details?: string;
    other_json?: any;
}

/**
 * Event - A discrete conference or show
 */
export interface ae_Event extends ae_BaseObj {
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"

    conference: boolean;
    type?: string;
    name: string;
    summary?: string;
    description?: string;

    timezone?: string;
    start_datetime?: string | Date;
    end_datetime?: string | Date;

    location_text?: string;
    location_address_json?: any;

    status?: string;
    approve?: boolean;
    ready?: boolean;
    ready_on?: string | Date;

    cfg_json?: any;
    data_json?: any;

    // IDAA Recovery Meetings / Additional fields
    contact_li_json?: any[];
    external_person_id?: string;
    physical?: boolean;
    virtual?: boolean;
    recurring?: boolean;
    recurring_text?: string;
    attend_url?: string;
    attend_url_text?: string;

    // Joined view fields
    event_location_obj_li?: ae_EventLocation[];
    event_session_obj_li?: ae_EventSession[];
    event_badge_template_obj_li?: ae_EventBadgeTemplate[];
}

/**
 * EventCfg - Advanced configuration for an event
 */
export interface ae_EventCfg extends ae_BaseObj {
    event_id_random: string; // NO LONGER USE "_random"

    enable_comments?: boolean;
    unauthenticated_access?: boolean;

    mod_abstracts_json?: any;
    mod_badges_json?: any;
    mod_exhibits_json?: any;
}

/**
 * EventBadge - An attendee's printed credentials
 */
export interface ae_EventBadge extends ae_BaseObj {
    event_badge_id: string;
    event_badge_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"
    person_id: string;
    person_id_random: string; // NO LONGER USE "_random"
    event_person_id?: string | null;
    event_person_id_random?: string | null; // NO LONGER USE "_random"

    event_badge_template_id?: string | null;
    event_badge_template_id_random?: string | null; // NO LONGER USE "_random"

    badge_type_code?: string | null;
    badge_type?: string | null;

    member_type_code?: string | null;
    member_status?: string | null;

    pronouns?: string | null;
    given_name?: string | null;
    middle_name?: string | null;
    family_name?: string | null;
    full_name?: string | null;
    affiliations?: string | null;

    professional_title?: string | null;
    email?: string | null;
    city?: string | null;
    state_province?: string | null;
    country?: string | null;

    print_count?: number | null;
    print_first_datetime?: string | Date | null;
    print_last_datetime?: string | Date | null;

    // Exhibitor lead capture opt-in. Must be true to allow adding as a lead.
    allow_tracking?: boolean | null;
    agree_to_tc?: boolean | null;

    ticket_list?: any[] | null;
    cfg_json?: any;
    data_json?: any;
    default_qry_str?: string | null;
}

/**
 * EventBadgeTemplate - Layout and style for badges
 */
export interface ae_EventBadgeTemplate extends ae_BaseObj {
    event_badge_template_id: string;
    event_badge_template_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"

    logo_path?: string | null;
    header_path?: string | null;
    header_row_1?: string | null;
    header_row_2?: string | null;

    footer_path?: string | null;
    footer_title?: string | null;

    badge_type_list?: any;
    ticket_list?: any;

    layout?: string | null;
    style_href?: string | null;
    passcode?: string | null;
}

/**
 * EventLocation - A room or area within an event
 */
export interface ae_EventLocation extends ae_BaseObj {
    event_location_id: string;
    event_location_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"

    location_type?: string | null;
    location_type_code?: string | null;

    internal_use?: boolean | null;
    record_audio?: boolean | null;
    record_video?: boolean | null;

    passcode?: string | null;
    data_json?: any;
}

/**
 * EventSession - A timed presentation or meeting
 */
export interface ae_EventSession extends ae_BaseObj {
    event_session_id: string;
    event_session_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"
    event_location_id?: string | null;
    event_location_id_random?: string | null; // NO LONGER USE "_random"
    event_track_id?: string | null;
    event_track_id_random?: string | null; // NO LONGER USE "_random"

    type_code?: string | null;
    start_datetime?: string | Date | null;
    end_datetime?: string | Date | null;

    internal_use?: boolean | null;
    record_audio?: boolean | null;
    record_video?: boolean | null;

    status?: number | null;
    approve?: boolean | null;
    ready?: boolean | null;

    data_json?: any;
    default_qry_str?: string | null;

    // Additional database view fields found in db_events.ts
    file_count?: number | null;
    file_count_all?: number | null;
    internal_use_count?: number | null;
    event_file_id_li_json?: string | null;
    poc_person_given_name?: string | null;
    poc_person_family_name?: string | null;
    poc_person_full_name?: string | null;
    poc_person_primary_email?: string | null;
    poc_person_passcode?: string | null;
    event_name?: string | null;
    event_location_code?: string | null;
    event_location_name?: string | null;

    // Joined fields (Aligned with Dexie Session interface)
    event_presentation_li?: ae_EventPresentation[] | null;
    event_file_li?: ae_EventFile[] | null;
    event_presentation_kv?: any;
    event_file_kv?: any;
    // Concatenated search strings from JOINed views (v_event_session_w_file_count)
    event_presentation_li_qry_str?: string | null;
    event_presenter_li_qry_str?: string | null;
}

/**
 * EventPresentation - A specific talk or session segment
 */
export interface ae_EventPresentation extends ae_BaseObj {
    event_presentation_id: string;
    event_presentation_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"
    event_session_id: string;
    event_session_id_random: string; // NO LONGER USE "_random"
    event_abstract_id?: string | null;
    event_abstract_id_random?: string | null; // NO LONGER USE "_random"

    abstract_code?: string | null;
    type_code?: string | null;

    start_datetime?: string | Date | null;
    end_datetime?: string | Date | null;

    passcode?: string | null;
    file_count?: number | null;

    // Joined fields
    event_presenter_li?: ae_EventPresenter[] | null;
    event_presenter_kv?: any;
    event_session_code?: string | null;
    event_session_name?: string | null;
}

/**
 * EventPresenter - A speaker or facilitator
 */
export interface ae_EventPresenter extends ae_BaseObj {
    event_presenter_id: string;
    event_presenter_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"
    person_id?: string | null;
    person_id_random?: string | null; // NO LONGER USE "_random"

    pronouns?: string | null;
    informal_name?: string | null;
    title_names?: string | null;
    given_name?: string;
    middle_name?: string | null;
    family_name?: string | null;
    designations?: string | null;

    professional_title?: string | null;
    tagline?: string | null;
    biography?: string | null;

    agree?: boolean | null;
    data_json?: any;
}

/**
 * EventTrack - A thematic grouping of sessions
 */
export interface ae_EventTrack extends ae_BaseObj {
    event_track_id: string;
    event_track_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"

    track_type?: string;
    track_type_code?: string;

    start_datetime?: string | Date;
    end_datetime?: string | Date;
}

/**
 * HostedFile - A file stored on the system
 */
export interface ae_HostedFile extends ae_BaseObj {
    hosted_file_id: string;
    hosted_file_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"

    hash_sha256?: string;
    subdirectory_path?: string;
    filename?: string;
    filename_no_ext?: string;
    filename_w_ext?: string;
    extension?: string;
    mimetype?: string;
    size?: number;
}

/**
 * HostedFileLink - A many-to-many link between objects and files
 */
export interface ae_HostedFileLink {
    id: string;
    account_id_random: string; // NO LONGER USE "_random"
    hosted_file_id_random: string; // NO LONGER USE "_random"
    link_to_type: string;
    link_to_id_random: string; // NO LONGER USE "_random"

    created_on: string | Date;
    updated_on: string | Date;
}

/**
 * DataStore - Generic JSON/Text storage
 */
export interface ae_DataStore extends ae_BaseObj {
    data_store_id: string;
    data_store_id_random: string; // NO LONGER USE "_random"
    account_id?: null | string;
    account_id_random?: null | string; // NO LONGER USE "_random"

    for_type?: null | string;
    for_id_random?: null | string; // NO LONGER USE "_random"
    for_id?: null | string;

    person_id_random?: null | string; // NO LONGER USE "_random"
    user_id_random?: null | string; // NO LONGER USE "_random"

    type?: null | string;

    json?: any;
    json_str?: null | string;
    text?: null | string;
    html?: null | string;

    meta_json?: null | string;
    meta_text?: null | string;

    access?: null | string;
    access_read?: null | string;
    access_write?: null | string;
    access_delete?: null | string;
}

/**
 * Post - A message board entry
 */
export interface ae_Post extends ae_BaseObj {
    post_id: string;
    // post_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    // account_id_random: string; // NO LONGER USE "_random"

    title: string;
    content: string;
    type?: string;

    anonymous: boolean;
    full_name?: string;
    email?: string;

    post_comment_count?: number;
    approve?: boolean;
    ready?: boolean;
}

/**
 * PostComment - A reply to a post
 */
export interface ae_PostComment extends ae_BaseObj {
    post_comment_id: string;
    // post_comment_id_random: string; // NO LONGER USE "_random"
    post_id: string;
    // post_id_random: string; // NO LONGER USE "_random"

    content: string;
    anonymous: boolean;
    full_name?: string;
}

/**
 * Page - A custom CMS page
 */
export interface ae_Page extends ae_BaseObj {
    page_id: string;
    page_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"

    alias: string;
    title: string;
    body: string;
    authentication_required: boolean;
}

/**
 * Archive - A collection of archival content
 * Related Files:
 * - src/lib/ae_archives/db_archives.ts (Dexie Interface)
 * - src/routes/idaa/(idaa)/archives/[archive_id]/+page.svelte (View)
 */
export interface ae_Archive extends ae_BaseObj {
    archive_id: string;
    archive_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"

    archive_type?: string;
    topic_id?: number;
    topic_name?: string;

    content_html?: string;

    original_datetime?: string | Date;
    original_location?: string;

    archive_on?: string | Date;

    archive_content_count?: number;
}

/**
 * ArchiveContent - A discrete item within an archive
 */
export interface ae_ArchiveContent extends ae_BaseObj {
    archive_content_id: string;
    archive_content_id_random: string; // NO LONGER USE "_random"
    archive_id_random: string; // NO LONGER USE "_random"

    archive_content_type?: string;
    content_html?: string;
    url?: string;

    duration?: string;

    hosted_file_id_random?: string; // NO LONGER USE "_random"
    filename?: string;
    file_extension?: string;
    subdirectory_path?: string;
}

/**
 * EventFile - A file associated with an event or event component
 */
export interface ae_EventFile extends ae_BaseObj {
    event_file_id: string;
    event_file_id_random?: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random?: string; // NO LONGER USE "_random"

    hosted_file_id: string;
    hosted_file_id_random?: string; // NO LONGER USE "_random"

    for_type?: string | null;
    for_id_random?: string | null; // NO LONGER USE "_random"

    filename?: string;
    filename_no_ext?: string;
    extension?: string;

    open_in_os?: string | null;

    file_purpose?: string | null;
    approve?: boolean | null;
}

/**
 * EventDevice - A local hardware device at an event
 */
export interface ae_EventDevice extends ae_BaseObj {
    event_device_id: string;
    event_device_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"
    event_location_id_random?: string; // NO LONGER USE "_random"

    app_mode?: string;
    status?: string;
    heartbeat?: string | Date;

    info_hostname?: string;
    info_ip?: string;
}

/**
 * EventAbstract - A proposal for a session or presentation
 */
export interface ae_EventAbstract extends ae_BaseObj {
    event_abstract_id: string;
    event_abstract_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"

    external_id?: string;
    abstract?: string;
    status?: number;
    approve?: boolean;
}

/**
 * Organization - A business or group entity
 */
export interface ae_Organization extends ae_BaseObj {
    organization_id: string;
    organization_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"

    tagline?: string;
    logo_path?: string;
    industry?: number;
}

/**
 * EventRegistration - An attendee's registration for an event
 */
export interface ae_EventRegistration extends ae_BaseObj {
    event_registration_id: string;
    event_registration_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"
    person_id: string;
    person_id_random: string; // NO LONGER USE "_random"

    organization_id_random?: string; // NO LONGER USE "_random"
    contact_id_random?: string; // NO LONGER USE "_random"
}

/**
 * EventExhibit - A booth or display at an event
 */
export interface ae_EventExhibit extends ae_BaseObj {
    event_exhibit_id: string;
    event_exhibit_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"

    organization_id_random?: string; // NO LONGER USE "_random"
    contact_id_random?: string; // NO LONGER USE "_random"
    person_id_random?: string; // NO LONGER USE "_random"

    tagline?: string;
    logo_path?: string;
    staff_limit?: number;
}

/**
 * EventExhibitTracking - Lead retrieval or interaction data
 */
export interface ae_EventExhibitTracking extends ae_BaseObj {
    event_exhibit_tracking_id: string;
    event_exhibit_tracking_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"
    event_exhibit_id_random: string; // NO LONGER USE "_random"

    event_person_id_random?: string; // NO LONGER USE "_random"
    event_badge_id_random?: string; // NO LONGER USE "_random"

    external_person_id?: string | null;

    exhibitor_notes?: string | null;
    responses_json?: any;
    default_qry_str?: string | null;
}

/**
 * EventPerson - An individual linked to an event
 */
export interface ae_EventPerson extends ae_BaseObj {
    event_person_id: string;
    event_person_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"
    person_id: string;
    person_id_random: string; // NO LONGER USE "_random"

    event_badge_id_random?: string; // NO LONGER USE "_random"
    event_registration_id_random?: string; // NO LONGER USE "_random"

    passcode?: string;
    agree_to_tc?: boolean;
}

/**
 * EventPersonProfile - Detailed bio/info for an attendee
 */
export interface ae_EventPersonProfile extends ae_BaseObj {
    event_person_profile_id: string;
    event_person_profile_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"
    event_person_id_random: string; // NO LONGER USE "_random"

    tagline?: string;
    biography?: string;
    website_url?: string;

    thumbnail_path?: string;
    picture_path?: string;
}

/**
 * EventPersonTracking - Attendance and session interaction tracking
 */
export interface ae_EventPersonTracking extends ae_BaseObj {
    event_person_id_random: string; // NO LONGER USE "_random"
    event_id: string;
    event_id_random: string; // NO LONGER USE "_random"

    event_session_id_random?: string; // NO LONGER USE "_random"

    check_in_out?: boolean;
    in_datetime?: string | Date;
    out_datetime?: string | Date;
}

/**
 * Sponsorship - A partnership level for an event
 */
export interface ae_Sponsorship extends ae_BaseObj {
    sponsorship_id: string;
    sponsorship_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"

    sponsorship_cfg_id_random: string; // NO LONGER USE "_random"
    amount?: number;
    paid?: boolean;
}

/**
 * SponsorshipCfg - Rules and levels for sponsorships
 */
export interface ae_SponsorshipCfg extends ae_BaseObj {
    sponsorship_cfg_id: string;
    sponsorship_cfg_id_random: string; // NO LONGER USE "_random"
    account_id: string;
    account_id_random: string; // NO LONGER USE "_random"

    level_li_json?: any;
    start_datetime?: string | Date;
    end_datetime?: string | Date;
}

/**
 * LogClientViewing - Playback and interaction tracking for media
 */
export interface ae_LogClientViewing extends ae_BaseObj {
    account_id_random: string; // NO LONGER USE "_random"
    external_client_id: string;

    object_type: string;
    object_id: string;

    page_load_on?: string | Date;
    play_start_count?: number;
    play_pause_count?: number;
    last_ping?: string | Date;
}
