CustomersDot Current State ERD

## Proposal

Build an Entity Relationship Diagram (ERD) representing the current state of the CustomersDot data model.

## ERD

```mermaid
erDiagram
    cloud_activations {
        bigint id
        timestampwithouttimezone created_at
        timestampwithouttimezone updated_at
        bigint customer_id
        charactervarying activation_code
        charactervarying subscription_name
        boolean super_sonics_aware
    }

    coupons {
        bigint id
        charactervarying batch_id
        charactervarying code
        smallint status
    }

    customers {
        integer id
        charactervarying first_name
        charactervarying last_name
        timestampwithouttimezone created_at
        timestampwithouttimezone updated_at
        charactervarying email
        charactervarying encrypted_password
        charactervarying reset_password_token
        timestampwithouttimezone reset_password_sent_at
        timestampwithouttimezone remember_created_at
        integer sign_in_count
        timestampwithouttimezone current_sign_in_at
        timestampwithouttimezone last_sign_in_at
        inet current_sign_in_ip
        inet last_sign_in_ip
        charactervarying provider
        charactervarying uid
        charactervarying zuora_account_id
        charactervarying country
        charactervarying state
        charactervarying city
        charactervarying zip_code
        charactervarying vat_code
        charactervarying company
        charactervarying salesforce_account_id
        boolean billable
        charactervarying access_token
        charactervarying confirmation_token
        timestampwithouttimezone confirmed_at
        timestampwithouttimezone confirmation_sent_at
        charactervarying unconfirmed_email
        charactervarying address_1
        charactervarying address_2
        charactervarying company_size
        charactervarying authentication_token
        charactervarying phone_number
        boolean login_activated
    }

    instance_review_settings {
        integer id
        integer users_count_threshold
        timestampwithouttimezone created_at
        timestampwithouttimezone updated_at
    }

    instance_reviews {
        integer id
        charactervarying email
        charactervarying first_name
        charactervarying last_name
        charactervarying company
        charactervarying address
        charactervarying phone
        charactervarying version
        integer users_count
        integer groups_count
        integer projects_count
        integer issues_count
        integer merge_requests_count
        integer internal_pipelines_count
        integer external_pipelines_count
        integer labels_count
        integer milestones_count
        integer notes_count
        integer snippets_count
        charactervarying country
        charactervarying state
        charactervarying employee_range
        boolean communication_opted_in
    }

    admins {
        integer id
        charactervarying email
        charactervarying encrypted_password
        charactervarying reset_password_token
        timestampwithouttimezone reset_password_sent_at
        timestampwithouttimezone remember_created_at
        integer sign_in_count
        timestampwithouttimezone current_sign_in_at
        timestampwithouttimezone last_sign_in_at
        inet current_sign_in_ip
        inet last_sign_in_ip
        timestampwithouttimezone created_at
        timestampwithouttimezone updated_at
        charactervarying authentication_token
        boolean manage_admin
        charactervarying provider
        charactervarying uid
        smallint customer_access_level
        smallint license_access_level
    }

    licenses {
        bigint id
        uuid license_file_md5
        bigint customer_id
        bigint creator_id
        timestampwithtimezone created_at
        timestampwithtimezone updated_at
        timestampwithtimezone last_synced_at
        timestampwithtimezone next_sync_at
        integer users_count
        integer previous_users_count
        integer trueup_quantity
        date expires_at
        date starts_at
        date trueup_from
        date trueup_to
        boolean trial
        boolean cloud_licensing_enabled
        charactervarying plan_code
        charactervarying plan_name
        charactervarying zuora_subscription_id
        charactervarying email
        charactervarying name
        charactervarying company
        charactervarying zuora_subscription_name
        text notes
        text license_file
        timestampwithtimezone activated_at
        boolean auto_renew_enabled
        boolean seat_reconciliation_enabled
        boolean operational_metrics_enabled
        boolean reconciliation_completed
        boolean offline_cloud_licensing_enabled
    }

    local_records {
        bigint id
        timestampwithouttimezone created_at
        timestampwithouttimezone updated_at
        charactervarying name
        text csv
    }

    orders {
        integer id
        integer customer_id
        charactervarying product_rate_plan_id
        charactervarying subscription_id
        charactervarying subscription_name
        date start_date
        date end_date
        integer quantity
        timestampwithouttimezone created_at
        timestampwithouttimezone updated_at
        charactervarying gl_namespace_id
        charactervarying gl_namespace_name
        charactervarying amendment_type
        boolean trial
        timestampwithouttimezone last_extra_ci_minutes_sync_at
        charactervarying zuora_account_id
        timestampwithouttimezone increased_billing_rate_notified_at
        boolean reconciliation_accepted
        timestampwithouttimezone billing_rate_adjusted_at
        charactervarying billing_rate_last_action
        smallint trial_extension_type
        charactervarying source
    }

    trial_histories {
        integer id
        charactervarying gl_namespace_id
        date start_date
        date expired_on
        timestampwithouttimezone created_at
        timestampwithouttimezone updated_at
        charactervarying glm_source
        charactervarying glm_content
        charactervarying trial_entity
    }

    zuora_user_with_hosts {
        integer id
        charactervarying zuora_user_id
        charactervarying host
        timestampwithouttimezone created_at
        timestampwithouttimezone updated_at
    }

    self_managed_instance_activations {
        bigint id
        timestampwithouttimezone created_at
        timestampwithouttimezone updated_at
        timestampwithouttimezone activated_at
        bigint self_managed_instance_id
        bigint cloud_activation_id
    }

    self_managed_instances {
        bigint id
        timestampwithouttimezone created_at
        timestampwithouttimezone updated_at
        charactervarying instance_identifier
    }

    license_seat_links {
        bigint id
        timestampwithouttimezone created_at
        timestampwithouttimezone updated_at
        bigint order_id
        integer active_user_count
        integer max_historical_user_count
        integer license_user_count
        date license_starts_on
        charactervarying zuora_subscription_name
        charactervarying zuora_subscription_id
        timestampwithtimezone report_timestamp
        bigint license_id
        bigint self_managed_instance_activation_id
        charactervarying gitlab_version
        charactervarying hostname
        charactervarying instance_identifier
        uuid license_md5
    }

    reconciliations {
        bigint id
        integer order_id
        integer user_count
        timestampwithouttimezone reconcile_done_at
        timestampwithouttimezone created_at
        timestampwithouttimezone updated_at
        text error_message
        date reconcile_on
        smallint skip_reason
        timestampwithtimezone upcoming_email_sent_at
        timestampwithtimezone completed_email_sent_at
        numeric quoted_invoice_amount
        timestampwithtimezone quoted_invoice_at
    }

    leads {
        bigint id
        timestampwithtimezone created_at
        timestampwithtimezone updated_at
        date trial_start_date
        bigint namespace_id
        bigint user_id
        boolean opt_in
        boolean currently_in_trial
        boolean is_for_business_use
        charactervarying first_name
        charactervarying last_name
        charactervarying email
        charactervarying phone
        charactervarying company_name
        charactervarying employees_bucket
        charactervarying country
        charactervarying state
        charactervarying product_interaction
        charactervarying provider
        text comment_capture
        charactervarying glm_content
        charactervarying glm_source
        timestampwithtimezone sent_at
    }

    cloud_activations }o--|| customers : ""
    self_managed_instance_activations }o--|| cloud_activations : ""
    licenses }o--|| customers : ""
    orders }o--|| customers : ""
    licenses }o--|| admins : ""
    license_seat_links }o--|| licenses : ""
    license_seat_links }o--|| orders : ""
    reconciliations }o--|| orders : ""
    license_seat_links }o--|| self_managed_instance_activations : ""
    self_managed_instance_activations }o--|| self_managed_instances : ""

```

Story points: 1.0