# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# This file is the source Rails uses to define your schema when running `bin/rails
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.2].define(version: 2026_04_08_210447) do
  create_table "employers", force: :cascade do |t|
    t.string "name"
    t.string "slug"
    t.string "pl_plan_key"
    t.integer "company_pb_entity_key"
    t.integer "plan_id"
    t.string "group_number"
    t.string "effective_date"
    t.boolean "active", default: false
    t.boolean "initialized", default: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "id_card_employer_logos", force: :cascade do |t|
    t.string "filename"
    t.binary "image_data"
    t.string "content_type"
    t.float "aspect_ratio"
    t.boolean "active", default: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "id_card_field_exception_items", force: :cascade do |t|
    t.string "field_name"
    t.string "field_value"
    t.bigint "field_exception_id", null: false
    t.bigint "network_logo_id"
    t.bigint "provider_section_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["field_exception_id"], name: "index_id_card_field_exception_items_on_field_exception_id"
    t.index ["network_logo_id"], name: "index_id_card_field_exception_items_on_network_logo_id"
    t.index ["provider_section_id"], name: "index_id_card_field_exception_items_on_provider_section_id"
  end

  create_table "id_card_field_exceptions", force: :cascade do |t|
    t.string "exception_type"
    t.string "exception_values"
    t.bigint "setup_id", null: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["setup_id"], name: "index_id_card_field_exceptions_on_setup_id"
  end

  create_table "id_card_network_logos", force: :cascade do |t|
    t.string "filename"
    t.binary "image_data"
    t.string "content_type"
    t.float "aspect_ratio"
    t.boolean "default", default: false
    t.boolean "active", default: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "id_card_plan_benefits", force: :cascade do |t|
    t.string "benefit_desc"
    t.string "benefit"
    t.integer "sequence"
    t.bigint "plan_id", null: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["plan_id"], name: "index_id_card_plan_benefits_on_plan_id"
  end

  create_table "id_card_plans", force: :cascade do |t|
    t.string "title"
    t.integer "pb_product_key"
    t.string "pl_plan_key"
    t.boolean "template"
    t.bigint "setup_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["setup_id"], name: "index_id_card_plans_on_setup_id"
  end

  create_table "id_card_print_data", force: :cascade do |t|
    t.string "full_name_last_name_first"
    t.string "employer_name"
    t.string "pl_plan_key"
    t.string "group_number"
    t.string "primary_mb_member_key"
    t.string "family_id"
    t.string "full_name"
    t.string "rx_group"
    t.string "medical_eff_date"
    t.string "dental_coverage"
    t.string "network_provider"
    t.string "provider_line_1"
    t.string "provider_line_2"
    t.string "provider_line_3"
    t.string "provider_line_4"
    t.string "provider_line_5"
    t.string "provider_line_6"
    t.string "provider_line_7"
    t.string "provider_line_8"
    t.string "provider_line_9"
    t.string "provider_line_10"
    t.string "provider_line_11"
    t.string "provider_line_12"
    t.string "claim_to_1"
    t.string "claim_to_2"
    t.string "claim_to_3"
    t.string "claim_to_4"
    t.string "claim_to_5"
    t.string "claim_to_6"
    t.string "claim_to_7"
    t.string "claim_to_8"
    t.string "claim_to_9"
    t.string "claim_to_10"
    t.string "claim_to_11"
    t.string "claim_to_12"
    t.string "customer_service"
    t.string "web_url"
    t.string "dependent_1"
    t.string "dependent_2"
    t.string "dependent_3"
    t.string "dependent_4"
    t.string "dependent_5"
    t.string "dependent_6"
    t.string "dependent_7"
    t.string "dependent_8"
    t.string "plan_id"
    t.string "benefit_desc_1"
    t.string "benefit_1"
    t.string "benefit_desc_2"
    t.string "benefit_2"
    t.string "benefit_desc_3"
    t.string "benefit_3"
    t.string "benefit_desc_4"
    t.string "benefit_4"
    t.string "benefit_desc_5"
    t.string "benefit_5"
    t.string "benefit_desc_6"
    t.string "benefit_6"
    t.string "benefit_desc_7"
    t.string "benefit_7"
    t.string "benefit_desc_8"
    t.string "benefit_8"
    t.string "benefit_desc_9"
    t.string "benefit_9"
    t.string "benefit_desc_10"
    t.string "benefit_10"
    t.string "benefit_desc_11"
    t.string "benefit_11"
    t.string "benefit_desc_12"
    t.string "benefit_12"
    t.string "benefit_desc_13"
    t.string "benefit_13"
    t.string "benefit_desc_14"
    t.string "benefit_14"
    t.string "precert_1"
    t.string "precert_2"
    t.string "precert_3"
    t.string "precert_4"
    t.string "network_logo_filename"
    t.string "employer_logo_filename"
    t.string "sample_plan_title"
    t.string "jasper_batch_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "id_card_provider_sections", force: :cascade do |t|
    t.string "title"
    t.string "provider_code"
    t.string "provider_line_1"
    t.string "provider_line_2"
    t.string "provider_line_3"
    t.string "provider_line_4"
    t.string "provider_line_5"
    t.string "provider_line_6"
    t.string "provider_line_7"
    t.string "provider_line_8"
    t.string "provider_line_9"
    t.string "provider_line_10"
    t.string "provider_line_11"
    t.string "provider_line_12"
    t.string "claim_to_1"
    t.string "claim_to_2"
    t.string "claim_to_3"
    t.string "claim_to_4"
    t.string "claim_to_5"
    t.string "claim_to_6"
    t.string "claim_to_7"
    t.string "claim_to_8"
    t.string "claim_to_9"
    t.string "claim_to_10"
    t.string "claim_to_11"
    t.string "claim_to_12"
    t.string "mail_to"
    t.string "mail_to_2"
    t.string "contact_line_1"
    t.string "contact_line_2"
    t.string "contact_line_3"
    t.string "group_number"
    t.string "rx_group_id"
    t.string "rx_contact"
    t.string "provider_lookup_1"
    t.string "provider_lookup_2"
    t.string "precert_1"
    t.string "precert_2"
    t.string "precert_3"
    t.string "precert_4"
    t.string "precert_5"
    t.string "precert_6"
    t.boolean "default", default: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "id_card_rx_sections", force: :cascade do |t|
    t.string "title"
    t.string "help_desk"
    t.string "customer_service"
    t.string "web_url"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "id_card_setups", force: :cascade do |t|
    t.string "print_name"
    t.string "network_provider"
    t.string "card_template"
    t.string "card_color"
    t.string "rx_group_number"
    t.string "pl_plan_key"
    t.boolean "has_divisions", default: false
    t.boolean "has_dental", default: false
    t.boolean "active", default: false
    t.boolean "initialized", default: false
    t.bigint "employer_id", null: false
    t.bigint "employer_logo_id"
    t.bigint "network_logo_id"
    t.bigint "provider_section_id"
    t.bigint "rx_section_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["employer_id"], name: "index_id_card_setups_on_employer_id"
    t.index ["employer_logo_id"], name: "index_id_card_setups_on_employer_logo_id"
    t.index ["network_logo_id"], name: "index_id_card_setups_on_network_logo_id"
    t.index ["provider_section_id"], name: "index_id_card_setups_on_provider_section_id"
    t.index ["rx_section_id"], name: "index_id_card_setups_on_rx_section_id"
  end

  create_table "members", force: :cascade do |t|
    t.string "name"
    t.string "family_id"
    t.integer "mb_member_key"
    t.integer "pb_entity_key"
    t.integer "pl_plan_key"
    t.string "id_card_display_name"
    t.string "coverage_class"
    t.string "division"
    t.string "dental_plan_key"
    t.text "dependents"
    t.bigint "employer_id"
    t.bigint "id_card_plan_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["employer_id"], name: "index_members_on_employer_id"
    t.index ["id_card_plan_id"], name: "index_members_on_id_card_plan_id"
  end

  create_table "report_comparison_errors", force: :cascade do |t|
    t.string "card_field"
    t.string "new_value"
    t.string "old_value"
    t.boolean "disabled", default: false
    t.bigint "employer_card_comparison_id"
    t.bigint "member_card_comparison_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["employer_card_comparison_id"], name: "index_report_comparison_errors_on_employer_card_comparison_id"
    t.index ["member_card_comparison_id"], name: "index_report_comparison_errors_on_member_card_comparison_id"
  end

  create_table "report_employer_card_comparisons", force: :cascade do |t|
    t.string "employer_name"
    t.string "pl_plan_key"
    t.integer "new_cards_count"
    t.integer "old_cards_count"
    t.integer "total_errors_count"
    t.boolean "passed", default: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "report_member_card_comparisons", force: :cascade do |t|
    t.integer "member_number"
    t.string "pl_plan_key"
    t.boolean "passed", default: false
    t.bigint "employer_card_comparison_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["employer_card_comparison_id"], name: "idx_on_employer_card_comparison_id_43d268709e"
  end

  create_table "report_old_card_duplicates", force: :cascade do |t|
    t.string "employer_name"
    t.string "full_name"
    t.string "group_number"
    t.string "medical_eff_date"
    t.string "dental_coverage"
    t.string "provider_line_1"
    t.string "provider_line_2"
    t.string "provider_line_3"
    t.string "provider_line_4"
    t.string "provider_line_5"
    t.string "provider_line_6"
    t.string "provider_line_7"
    t.string "provider_line_8"
    t.string "provider_line_9"
    t.string "provider_line_10"
    t.string "provider_line_11"
    t.string "provider_line_12"
    t.string "claim_to_1"
    t.string "claim_to_2"
    t.string "claim_to_3"
    t.string "claim_to_4"
    t.string "claim_to_5"
    t.string "claim_to_6"
    t.string "claim_to_7"
    t.string "claim_to_8"
    t.string "claim_to_9"
    t.string "claim_to_10"
    t.string "claim_to_11"
    t.string "claim_to_12"
    t.string "family_id"
    t.string "rx_group"
    t.string "customer_service"
    t.string "web_url"
    t.string "benefit_desc_1"
    t.string "benefit_1"
    t.string "benefit_desc_2"
    t.string "benefit_2"
    t.string "benefit_desc_3"
    t.string "benefit_3"
    t.string "benefit_desc_4"
    t.string "benefit_4"
    t.string "benefit_desc_5"
    t.string "benefit_5"
    t.string "benefit_desc_6"
    t.string "benefit_6"
    t.string "benefit_desc_7"
    t.string "benefit_7"
    t.string "benefit_desc_8"
    t.string "benefit_8"
    t.string "benefit_desc_9"
    t.string "benefit_9"
    t.string "benefit_desc_10"
    t.string "benefit_10"
    t.string "benefit_desc_11"
    t.string "benefit_11"
    t.string "benefit_desc_12"
    t.string "benefit_12"
    t.string "benefit_desc_13"
    t.string "benefit_13"
    t.string "benefit_desc_14"
    t.string "benefit_14"
    t.string "dependent_1"
    t.string "dependent_2"
    t.string "dependent_3"
    t.string "dependent_4"
    t.string "dependent_5"
    t.string "dependent_6"
    t.string "dependent_7"
    t.string "dependent_8"
    t.string "pl_plan_key"
    t.string "primary_mb_member_key"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "solid_queue_blocked_executions", force: :cascade do |t|
    t.bigint "job_id", null: false
    t.string "queue_name", null: false
    t.integer "priority", default: 0, null: false
    t.string "concurrency_key", null: false
    t.datetime "expires_at", null: false
    t.datetime "created_at", null: false
    t.index ["concurrency_key", "priority", "job_id"], name: "index_solid_queue_blocked_executions_for_release"
    t.index ["expires_at", "concurrency_key"], name: "index_solid_queue_blocked_executions_for_maintenance"
    t.index ["job_id"], name: "index_solid_queue_blocked_executions_on_job_id", unique: true
  end

  create_table "solid_queue_claimed_executions", force: :cascade do |t|
    t.bigint "job_id", null: false
    t.bigint "process_id"
    t.datetime "created_at", null: false
    t.index ["job_id"], name: "index_solid_queue_claimed_executions_on_job_id", unique: true
    t.index ["process_id", "job_id"], name: "index_solid_queue_claimed_executions_on_process_id_and_job_id"
  end

  create_table "solid_queue_failed_executions", force: :cascade do |t|
    t.bigint "job_id", null: false
    t.text "error"
    t.datetime "created_at", null: false
    t.index ["job_id"], name: "index_solid_queue_failed_executions_on_job_id", unique: true
  end

  create_table "solid_queue_jobs", force: :cascade do |t|
    t.string "queue_name", null: false
    t.string "class_name", null: false
    t.text "arguments"
    t.integer "priority", default: 0, null: false
    t.string "active_job_id"
    t.datetime "scheduled_at"
    t.datetime "finished_at"
    t.string "concurrency_key"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["active_job_id"], name: "index_solid_queue_jobs_on_active_job_id"
    t.index ["class_name"], name: "index_solid_queue_jobs_on_class_name"
    t.index ["finished_at"], name: "index_solid_queue_jobs_on_finished_at"
    t.index ["queue_name", "finished_at"], name: "index_solid_queue_jobs_for_filtering"
    t.index ["scheduled_at", "finished_at"], name: "index_solid_queue_jobs_for_alerting"
  end

  create_table "solid_queue_pauses", force: :cascade do |t|
    t.string "queue_name", null: false
    t.datetime "created_at", null: false
    t.index ["queue_name"], name: "index_solid_queue_pauses_on_queue_name", unique: true
  end

  create_table "solid_queue_processes", force: :cascade do |t|
    t.string "kind", null: false
    t.datetime "last_heartbeat_at", null: false
    t.bigint "supervisor_id"
    t.integer "pid", null: false
    t.string "hostname"
    t.text "metadata"
    t.datetime "created_at", null: false
    t.string "name", null: false
    t.index ["last_heartbeat_at"], name: "index_solid_queue_processes_on_last_heartbeat_at"
    t.index ["name", "supervisor_id"], name: "index_solid_queue_processes_on_name_and_supervisor_id", unique: true
    t.index ["supervisor_id"], name: "index_solid_queue_processes_on_supervisor_id"
  end

  create_table "solid_queue_ready_executions", force: :cascade do |t|
    t.bigint "job_id", null: false
    t.string "queue_name", null: false
    t.integer "priority", default: 0, null: false
    t.datetime "created_at", null: false
    t.index ["job_id"], name: "index_solid_queue_ready_executions_on_job_id", unique: true
    t.index ["priority", "job_id"], name: "index_solid_queue_poll_all"
    t.index ["queue_name", "priority", "job_id"], name: "index_solid_queue_poll_by_queue"
  end

  create_table "solid_queue_recurring_executions", force: :cascade do |t|
    t.bigint "job_id", null: false
    t.string "task_key", null: false
    t.datetime "run_at", null: false
    t.datetime "created_at", null: false
    t.index ["job_id"], name: "index_solid_queue_recurring_executions_on_job_id", unique: true
    t.index ["task_key", "run_at"], name: "index_solid_queue_recurring_executions_on_task_key_and_run_at", unique: true
  end

  create_table "solid_queue_recurring_tasks", force: :cascade do |t|
    t.string "key", null: false
    t.string "schedule", null: false
    t.string "command", limit: 2048
    t.string "class_name"
    t.text "arguments"
    t.string "queue_name"
    t.integer "priority", default: 0
    t.boolean "static", default: true, null: false
    t.text "description"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["key"], name: "index_solid_queue_recurring_tasks_on_key", unique: true
    t.index ["static"], name: "index_solid_queue_recurring_tasks_on_static"
  end

  create_table "solid_queue_scheduled_executions", force: :cascade do |t|
    t.bigint "job_id", null: false
    t.string "queue_name", null: false
    t.integer "priority", default: 0, null: false
    t.datetime "scheduled_at", null: false
    t.datetime "created_at", null: false
    t.index ["job_id"], name: "index_solid_queue_scheduled_executions_on_job_id", unique: true
    t.index ["scheduled_at", "priority", "job_id"], name: "index_solid_queue_dispatch_all"
  end

  create_table "solid_queue_semaphores", force: :cascade do |t|
    t.string "key", null: false
    t.integer "value", default: 1, null: false
    t.datetime "expires_at", null: false
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
    t.index ["expires_at"], name: "index_solid_queue_semaphores_on_expires_at"
    t.index ["key", "value"], name: "index_solid_queue_semaphores_on_key_and_value"
    t.index ["key"], name: "index_solid_queue_semaphores_on_key", unique: true
  end

  add_foreign_key "id_card_field_exception_items", "id_card_field_exceptions", column: "field_exception_id"
  add_foreign_key "id_card_field_exception_items", "id_card_network_logos", column: "network_logo_id"
  add_foreign_key "id_card_field_exception_items", "id_card_provider_sections", column: "provider_section_id"
  add_foreign_key "id_card_field_exceptions", "id_card_setups", column: "setup_id"
  add_foreign_key "id_card_plan_benefits", "id_card_plans", column: "plan_id"
  add_foreign_key "id_card_plans", "id_card_setups", column: "setup_id"
  add_foreign_key "id_card_setups", "employers"
  add_foreign_key "id_card_setups", "id_card_employer_logos", column: "employer_logo_id"
  add_foreign_key "id_card_setups", "id_card_network_logos", column: "network_logo_id"
  add_foreign_key "id_card_setups", "id_card_provider_sections", column: "provider_section_id"
  add_foreign_key "id_card_setups", "id_card_rx_sections", column: "rx_section_id"
  add_foreign_key "members", "employers"
  add_foreign_key "members", "id_card_plans"
  add_foreign_key "report_comparison_errors", "report_employer_card_comparisons", column: "employer_card_comparison_id"
  add_foreign_key "report_comparison_errors", "report_member_card_comparisons", column: "member_card_comparison_id"
  add_foreign_key "report_member_card_comparisons", "report_employer_card_comparisons", column: "employer_card_comparison_id"
  add_foreign_key "solid_queue_blocked_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade
  add_foreign_key "solid_queue_claimed_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade
  add_foreign_key "solid_queue_failed_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade
  add_foreign_key "solid_queue_ready_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade
  add_foreign_key "solid_queue_recurring_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade
  add_foreign_key "solid_queue_scheduled_executions", "solid_queue_jobs", column: "job_id", on_delete: :cascade
end
