Employer table broken up and new idcard module setup

This commit is contained in:
Jason Jordan
2026-03-06 10:56:20 -05:00
parent 8ecabf60ff
commit 6a068243f4
31 changed files with 628 additions and 571 deletions
+14 -10
View File
@@ -1,4 +1,6 @@
class EmployersController < ApplicationController
# View Methods
def index
@employers = Employer.all
end
@@ -12,16 +14,6 @@ class EmployersController < ApplicationController
render :new
end
def import
word_doc = params[:employer][:import_from_word]
if word_doc.present? && word_doc.is_a?(ActionDispatch::Http::UploadedFile)
@employer = BenefitsWordDocProcessor.new(word_doc.tempfile).call
else
@employer = Employer.new
end
render :new
end
# def import_old
# word_doc = params[:employer][:import_from_word]
# @plan_templates = IdCardBenefitsTemplate.where.not(title: "BLANK")
@@ -74,6 +66,18 @@ class EmployersController < ApplicationController
# redirect_to resources_url, notice: 'Resource was successfully destroyed.'
end
# API Methods
def import
word_doc = params[:employer][:import_from_word]
if word_doc.present? && word_doc.is_a?(ActionDispatch::Http::UploadedFile)
@employer = BenefitsWordDocProcessor.new(word_doc.tempfile).call
else
@employer = Employer.new
end
render :new
end
private
# def process_logos(employer_setup_process_params)
@@ -1,27 +1,18 @@
class IdCard::EmployerLogosController < ApplicationController
module IdCard
class EmployerLogosController < ApplicationController
# View Methods
def index
end
def show
end
def image
logo_file = IdCard::EmployerLogo.find(params[:id])
puts params[:id]
logo_binary = logo_file.image_data
logo_filename = logo_file.filename
send_data logo_binary,
filename: logo_filename,
disposition: 'inline'
end
def new
end
def create
file = card_logo_file_params["logo_file"]
file = logo_params["logo_file"]
if file.present? && file.is_a?(ActionDispatch::Http::UploadedFile)
filename = file.original_filename
# binary_data = file.read
@@ -47,10 +38,24 @@ class IdCard::EmployerLogosController < ApplicationController
def destroy
end
private
# API Methods
def card_logo_file_params
params.require(:card_logo_file).permit(:logo_file, :logo_type)
def image
logo_file = IdCard::EmployerLogo.find(params[:id])
puts params[:id]
logo_binary = logo_file.image_data
logo_filename = logo_file.filename
send_data logo_binary,
filename: logo_filename,
disposition: 'inline'
end
private
def logo_params
params.require(:id_card_employer_logo).permit(:logo_file)
end
end
end
+8 -2
View File
@@ -1,12 +1,15 @@
class IdCard::SetupController < ApplicationController
module IdCard
class SetupController < ApplicationController
# View Methods
def new
@employer = Employer.find_by(slug: params[:employer])
@setup = @employer.id_card_setup.new
@setup = @employer.create_id_card_setup
render :new
end
def create
xyz
employer_params = Employer.permitted_params(params)
puts "---Params---"
puts employer_params
@@ -46,6 +49,8 @@ class IdCard::SetupController < ApplicationController
# redirect_to resources_url, notice: 'Resource was successfully destroyed.'
end
# API Methods
private
# def process_logos(employer_setup_process_params)
@@ -233,4 +238,5 @@ class IdCard::SetupController < ApplicationController
# def permited_plan_param_list
# (1..14).map { |i| i.to_s.to_sym }.push(:plan_id)
# end
end
end
@@ -5,11 +5,11 @@ export default class extends Controller {
logoType: String,
employerName: String
}
static targets = ["preview", "previewContainer", "logoSelect", "logofield", "initialLogoFile"];
static targets = ["preview", "previewContainer", "logoSelect", "logoField", "initialLogoFile"];
async connect() {
console.log('in connect');
const initValue = this.logofieldTarget.value
const initValue = this.logoFieldTarget.value
console.log(initValue)
if (initValue) {
const response = await fetch(`/id_card/${this.logoTypeValue}_logos/${initValue}/image`); // Fetch the binary data
@@ -25,41 +25,49 @@ export default class extends Controller {
uploadLogo(event) {
console.log('in uploadLogo');
event.preventDefault()
const file = event.target.files[0];
if (!file) return;
let logoFile = event.target.files[0];
if (!logoFile) return;
const logoType = this.logoTypeValue
let newFileName = file.name
let newFileName = logoFile.name
if (logoType == "network") {
console.log("n " + newFileName);
newFileName = this.determineNetworkFilename(file)
newFileName = this.determineNetworkFilename(logoFile)
this.addOptionToSelect(newFileName)
logoFile = new File([logoFile], newFileName)
} else if (logoType == "employer") {
newFileName = this.determineEmployerFilename(file)
file.name = newFileName
newFileName = this.determineEmployerFilename(logoFile)
logoFile = new File([logoFile], newFileName)
}
this.previewFile(file);
this.uploadLogoToServer(file);
this.logofieldTarget.value = newFileName;
this.uploadLogoToServer(logoFile)
.then((result) => {
console.log(result);
const logoId = result.id
this.previewFile(logoFile);
this.logoFieldTarget.value = logoId;
})
.catch((error) => {
// Handle any errors that occurred
console.error(error);
});
}
previewFile(file) {
previewFile(logoFile) {
console.log('in previewFile');
const reader = new FileReader();
reader.onload = (e) => {
this.previewTarget.src = e.target.result;
this.previewContainerTarget.classList.remove("hidden");
};
reader.readAsDataURL(file);
reader.readAsDataURL(logoFile);
}
async uploadLogoToServer(file) {
async uploadLogoToServer(logoFile) {
console.log('in uploadLogoToServer');
const formData = new FormData();
formData.append(`id_card_${this.logoTypeValue}_logo[logo_file]`, file);
formData.append(`id_card_${this.logoTypeValue}_logo[logo_file]`, logoFile);
const csrfToken = document.querySelector("meta[name='csrf-token']").content;
@@ -74,11 +82,14 @@ export default class extends Controller {
if (response.ok) {
console.log('Upload successful!')
const data = await response.json();
return data;
} else {
console.error("Failed to track event.");
throw new Error(`HTTP error! status: ${response.status}`);
}
} catch (error) {
console.error("Network error:", error);
throw new Error("Network error:", error);
}
}
@@ -86,17 +97,17 @@ export default class extends Controller {
const blankOptionIndex = 0;
const newOption = new Option(name, name, true, true)
if (this.logofieldTarget.options.length > blankOptionIndex + 1) {
this.logofieldTarget.insertBefore(newOption, this.logofieldTarget.options[blankOptionIndex + 1]);
if (this.logoFieldTarget.options.length > blankOptionIndex + 1) {
this.logoFieldTarget.insertBefore(newOption, this.logoFieldTarget.options[blankOptionIndex + 1]);
} else {
this.logofieldTarget.appendChild(newOption);
this.logoFieldTarget.appendChild(newOption);
}
this.logofieldTarget.value = name;
this.logoFieldTarget.value = name;
}
determineNetworkFilename(file) {
const fileExtension = file.name.split('.').pop();
determineNetworkFilename(logoFile) {
const fileExtension = logoFile.name.split('.').pop();
const primaryNetworkName = prompt("Enter the name for the primary network (Usually 'Cigna' or 'MedCost':");
const secondaryNetworkName = prompt("Enter the name for the primary network (ex: Health Partners):");
const logoFilename = this.titleizeText(primaryNetworkName).concat(this.titleizeText(secondaryNetworkName)).concat("Logo.").concat(fileExtension).replaceAll(' ', '');
@@ -104,8 +115,8 @@ export default class extends Controller {
return logoFilename
}
determineEmployerFilename(file) {
const fileExtension = file.name.split('.').pop();
determineEmployerFilename(logoFile) {
const fileExtension = logoFile.name.split('.').pop();
const employerName = this.employerNameValue
const logoFilename = this.titleizeText(employerName).concat("Logo.").concat(fileExtension).replaceAll(' ', '');
@@ -120,3 +131,4 @@ export default class extends Controller {
});
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
class Employer < ApplicationRecord
has_many :members
has_one :id_card_setup, class_name: 'IdCard::Setup'
has_one :id_card_setup, class_name: 'IdCard::Setup', dependent: :destroy
scope :active, -> { where(active: true) }
scope :inactive, -> { where(active: false) }
+3 -1
View File
@@ -1,4 +1,5 @@
class IdCard::EmployerLogo < ApplicationRecord
module IdCard
class EmployerLogo < ApplicationRecord
before_save :calculate_aspect_ratio, if: :image_data_changed?
private
@@ -11,4 +12,5 @@ class IdCard::EmployerLogo < ApplicationRecord
self.aspect_ratio = image_ratio.round(2)
end
end
end
end
+6 -4
View File
@@ -1,10 +1,12 @@
class IdCard::Exception < ApplicationRecord
belongs_to :id_card_setup
has_many :id_card_exception_items
accepts_nested_attributes_for :id_card_exception_items, allow_destroy: true, reject_if: :all_blank
module IdCard
class Exception < ApplicationRecord
belongs_to :setup
has_many :exception_items
accepts_nested_attributes_for :exception_items, allow_destroy: true, reject_if: :all_blank
VALID_TYPES = ['zipcode', 'state', 'family_id']
validates :type, inclusion: { in: VALID_TYPES,
message: "%{value} is not a valid exception type" }
end
end
+6 -4
View File
@@ -1,7 +1,8 @@
class IdCard::ExceptionItem < ApplicationRecord
belongs_to :id_card_exception
belongs_to :id_card_network_logo, optional: true
belongs_to :id_card_provider_section, optional: true
module IdCard
class ExceptionItem < ApplicationRecord
belongs_to :exception
belongs_to :network_logo, optional: true
belongs_to :provider_section, optional: true
validate :only_one_exception_field_present
@@ -22,4 +23,5 @@ class IdCard::ExceptionItem < ApplicationRecord
errors.add(:base, "Only one exception field can be present at a time")
end
end
end
end
+3 -1
View File
@@ -1,4 +1,5 @@
class IdCard::NetworkLogo < ApplicationRecord
module IdCard
class NetworkLogo < ApplicationRecord
before_save :round_aspect_ratio
private
@@ -8,4 +9,5 @@ class IdCard::NetworkLogo < ApplicationRecord
self.aspect_ratio = self.aspect_ratio.round(2)
end
end
end
end
+6 -4
View File
@@ -1,7 +1,8 @@
class IdCard::Plan < ApplicationRecord
belongs_to :id_card_setup
has_many :id_card_plan_benefits, dependent: :destroy
accepts_nested_attributes_for :id_card_plan_benefits, allow_destroy: true, reject_if: :all_blank
module IdCard
class Plan < ApplicationRecord
belongs_to :setup
has_many :plan_benefits, dependent: :destroy
accepts_nested_attributes_for :plan_benefits, allow_destroy: true, reject_if: :all_blank
# after_initialize :create_default_benefits, if: :new_record?
@@ -30,4 +31,5 @@ class IdCard::Plan < ApplicationRecord
id_card_plan_benefits.new(benefit_desc: ben.benefit_desc, sequence: ben.sequence)
end
end
end
end
+4 -2
View File
@@ -1,3 +1,5 @@
class IdCard::PlanBenefit < ApplicationRecord
belongs_to :id_card_plan
module IdCard
class PlanBenefit < ApplicationRecord
belongs_to :plan
end
end
+3 -2
View File
@@ -1,4 +1,5 @@
class IdCard::PrintData < ApplicationRecord
module IdCard
class PrintData < ApplicationRecord
STRING_ATTRIBUTES = %w[provider_line_1 provider_line_2 provider_line_3 provider_line_4 provider_line_5 provider_line_6 provider_line_7 provider_line_8 provider_line_9 provider_line_10 provider_line_11 claim_to_1 claim_to_2 claim_to_3 claim_to_4 claim_to_5 claim_to_6 claim_to_7 claim_to_8 claim_to_9 claim_to_10 claim_to_11 dependent_1 dependent_2 dependent_3 dependent_4 dependent_5 dependent_6 dependent_7 dependent_8]
@@ -10,5 +11,5 @@ class IdCard::PrintData < ApplicationRecord
self[attr] = "" if self[attr].blank?
end
end
end
end
+3 -1
View File
@@ -1,3 +1,5 @@
class IdCard::ProviderSection < ApplicationRecord
module IdCard
class ProviderSection < ApplicationRecord
end
end
+3 -1
View File
@@ -1,3 +1,5 @@
class IdCard::RxSection < ApplicationRecord
module IdCard
class RxSection < ApplicationRecord
end
end
+13 -9
View File
@@ -1,18 +1,21 @@
class IdCard::Setup < ApplicationRecord
belongs_to :employer
belongs_to :id_card_employer_logo
belongs_to :id_card_network_logo
belongs_to :id_card_provider_section
belongs_to :id_card_rx_section
module IdCard
class Setup < ApplicationRecord
belongs_to :employer, class_name: 'Employer'
belongs_to :employer_logo, optional: true
belongs_to :network_logo, optional: true
belongs_to :provider_section, optional: true
belongs_to :rx_section, optional: true
has_many :card_exceptions, dependent: :destroy
has_many :plans, dependent: :destroy
has_many :exceptions, dependent: :destroy
# def employer_logo_filename
# self.id_card_employer_logo.filename
# self.employer_logo.filename
# end
# def network_logo_filename
# self.id_card_network_logo.filename
# self.network_logo.filename
# end
def self.permitted_params(params)
@@ -24,4 +27,5 @@ class IdCard::Setup < ApplicationRecord
:id_card_employer_logo_id
)
end
end
end
@@ -15,6 +15,9 @@ module BenefitsWordDoc
plan_lines = @word_doc_section.slice(plan_index + 1, 14)
plan_lines.each_with_index do |line, i|
field_mapping = mapping_array[i]
if line.match(/:.*/)
field_value = line.match(/:.*/)[0].strip
else
field_regex = field_mapping[:doc_to_employer_regex]
if line.match(field_regex)
field_value = line.match(field_regex)[0].strip
@@ -23,6 +26,7 @@ module BenefitsWordDoc
else
field_value = line
end
end
employer_benefit_desc_field = field_mapping[:employer_benefit_desc_field]
new_benefit = new_plan.plan_benefits[i]
new_benefit.benefit = field_value
+1 -1
View File
@@ -21,7 +21,7 @@ class ImageProcessor
filename: filename,
image_data: binary_data,
content_type: meme_type,
logo_type: "network"
logo_type: "employer"
)
end
end
+2 -2
View File
@@ -23,7 +23,7 @@ module SampleCard
def set_employer_fields
selected_attributes = {
employer_name: @employer.name,
group_number: @employer.group_number || "999999",
group_number: @employer.group_number.present? ? @employer.group_number : "999999",
medical_eff_date: @employer.effective_date
}
@@ -49,7 +49,7 @@ module SampleCard
selected_attributes = {
full_name: "JANE DOE",
primary_mb_member_key: "888888",
rx_group: @employer.group_number || "999999"
rx_group: @employer.group_number.present? ? @employer.group_number : "999999"
}
@sample_card.assign_attributes(selected_attributes)
@@ -1,9 +1,10 @@
<div class="bg-deepcove h-full w-full flex flex-col">
<div class="flex justify-between my-5 font-bold text-4xl">
<div class="flex space-x-6 my-5 font-bold text-4xl">
<h1 class="text-platinum">New ID Card Setup:</h1>
<h1 class="text-verdigris">(<%= @employer.name %>)</h1>
</div>
<%= form_with model: @setup, local: true, multipart: true do |f| %>
<%= form_with model: @employer, url: import_employers_path, data: { turbo: false }, local: true, multipart: true do |form| %>
<div class="flex flex-col space-y-6 pb-10">
<div class="flex w-full items-end" data-controller="logo-upload" data-logo-upload-logo-type-value="employer" data-logo-upload-employer-name-value=<%= @employer.name %>>
<div class="flex flex-col space-y-6 w-2/5">
@@ -25,7 +26,7 @@
</div>
<div class="flex items-end">
<div class="flex">
<div class="text-platinum">Employer Logo</div>
<div class="text-platinum text-lg">Employer Logo</div>
<div class="flex items-center justify-center self-end cursor-pointer bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-r h-10 transition duration-100">
<label for="employer_logo_file" class="text-center cursor-pointer">
<%= icon "image-plus", library: "lucide" %>
@@ -35,13 +36,13 @@
<div class="hidden flex justify-center ml-15 rounded-lg border-4 border-atmosphere" data-logo-upload-target="previewContainer">
<img data-logo-upload-target="preview" src="#" alt="Employer Logo preview" class="max-h-[100px] max-w-[133px] bg-platinum m-1"/>
</div>
<%= f.hidden_field :id_card_employer_logo_id, data: { logo_upload_target: "logofield", logo_upload_target: "employer" } %>
<%= f.file_field :add_or_update_logo, class: "hidden", id: "employer_logo_file", data: { logo_upload_target: "previewContainer", parent_value: "network_logo", action: "change->logo-upload#uploadLogo" }, direct_upload: true %>
<%= f.hidden_field :employer_logo_id, label: { text: "Employer Logo" }, data: { logo_upload_target: "logoField" } %>
<%= f.file_field :logo_file, class: "hidden", id: "employer_logo_file", data: { logo_upload_target: "previewContainer", parent_value: "network_logo", action: "change->logo-upload#uploadLogo" }, direct_upload: true %>
</div>
</div>
</div>
<div class="py-8">
<%= f.submit "Create New Employer" %>
<%= f.submit "Create ID Card Setup" %>
</div>
</div>
<% end %>
+2
View File
@@ -15,6 +15,8 @@ services:
- HISTFILE=/usr/src/app/log/.bash_history
- RAILS_ENV=development
- TAILWIND_POLLING=true
- PUID=1000
- PGID=100
tty: true
stdin_open: true
depends_on:
@@ -7,10 +7,10 @@ class CreateIdCardSetups < ActiveRecord::Migration[7.2]
t.string :rx_group_number
t.boolean :active, default: false
t.belongs_to :employer, null: false, foreign_key: true
t.belongs_to :id_card_employer_logo, null: true, foreign_key: true
t.belongs_to :id_card_network_logo, null: true, foreign_key: true
t.belongs_to :id_card_provider_section, null: false, foreign_key: true
t.belongs_to :id_card_rx_section, null: false, foreign_key: true
t.belongs_to :employer_logo, null: true, foreign_key: { to_table: :id_card_employer_logos }
t.belongs_to :network_logo, null: true, foreign_key: { to_table: :id_card_network_logos }
t.belongs_to :provider_section, null: true, foreign_key: { to_table: :id_card_provider_sections }
t.belongs_to :rx_section, null: true, foreign_key: { to_table: :id_card_rx_sections }
t.timestamps
end
@@ -4,7 +4,8 @@ class CreateIdCardPlans < ActiveRecord::Migration[7.2]
t.string :title
t.integer :pb_product_key
t.string :pl_plan_key
t.belongs_to :id_card_setup, null: true, foreign_key: true
t.boolean :template
t.belongs_to :setup, null: true, foreign_key: { to_table: :id_card_setups }
t.timestamps
end
@@ -4,7 +4,7 @@ class CreateIdCardPlanBenefits < ActiveRecord::Migration[7.2]
t.string :benefit_desc
t.string :benefit
t.integer :sequence
t.belongs_to :id_card_plan, null: false, foreign_key: true
t.belongs_to :plan, null: false, foreign_key: { to_table: :id_card_plans }
t.timestamps
end
@@ -3,7 +3,7 @@ class CreateIdCardExceptions < ActiveRecord::Migration[7.2]
create_table :id_card_exceptions do |t|
t.string :type
t.string :value
t.belongs_to :id_card_setup, null: false, foreign_key: true
t.belongs_to :setup, null: false, foreign_key: { to_table: :id_card_setups }
t.timestamps
end
@@ -3,9 +3,9 @@ class CreateIdCardExceptionItems < ActiveRecord::Migration[7.2]
create_table :id_card_exception_items do |t|
t.string :field_name
t.string :field_value
t.belongs_to :id_card_exception, null: false, foreign_key: true
t.belongs_to :id_card_network_logo, null: true, foreign_key: true
t.belongs_to :id_card_provider_section, null: true, foreign_key: true
t.belongs_to :exception, null: false, foreign_key: { to_table: :id_card_exceptions }
t.belongs_to :network_logo, null: true, foreign_key: { to_table: :id_card_network_logos }
t.belongs_to :provider_section, null: true, foreign_key: { to_table: :id_card_provider_sections }
t.timestamps
end
+31 -30
View File
@@ -37,23 +37,23 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_16_182836) do
create_table "id_card_exception_items", force: :cascade do |t|
t.string "field_name"
t.string "field_value"
t.bigint "id_card_exception_id", null: false
t.bigint "id_card_network_logo_id"
t.bigint "id_card_provider_section_id"
t.bigint "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 ["id_card_exception_id"], name: "index_id_card_exception_items_on_id_card_exception_id"
t.index ["id_card_network_logo_id"], name: "index_id_card_exception_items_on_id_card_network_logo_id"
t.index ["id_card_provider_section_id"], name: "index_id_card_exception_items_on_id_card_provider_section_id"
t.index ["exception_id"], name: "index_id_card_exception_items_on_exception_id"
t.index ["network_logo_id"], name: "index_id_card_exception_items_on_network_logo_id"
t.index ["provider_section_id"], name: "index_id_card_exception_items_on_provider_section_id"
end
create_table "id_card_exceptions", force: :cascade do |t|
t.string "type"
t.string "value"
t.bigint "id_card_setup_id", null: false
t.bigint "setup_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["id_card_setup_id"], name: "index_id_card_exceptions_on_id_card_setup_id"
t.index ["setup_id"], name: "index_id_card_exceptions_on_setup_id"
end
create_table "id_card_network_logos", force: :cascade do |t|
@@ -70,20 +70,21 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_16_182836) do
t.string "benefit_desc"
t.string "benefit"
t.integer "sequence"
t.bigint "id_card_plan_id", null: false
t.bigint "plan_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["id_card_plan_id"], name: "index_id_card_plan_benefits_on_id_card_plan_id"
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.bigint "id_card_setup_id"
t.boolean "template"
t.bigint "setup_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["id_card_setup_id"], name: "index_id_card_plans_on_id_card_setup_id"
t.index ["setup_id"], name: "index_id_card_plans_on_setup_id"
end
create_table "id_card_print_data", force: :cascade do |t|
@@ -226,17 +227,17 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_16_182836) do
t.string "rx_group_number"
t.boolean "active", default: false
t.bigint "employer_id", null: false
t.bigint "id_card_employer_logo_id"
t.bigint "id_card_network_logo_id"
t.bigint "id_card_provider_section_id", null: false
t.bigint "id_card_rx_section_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 ["id_card_employer_logo_id"], name: "index_id_card_setups_on_id_card_employer_logo_id"
t.index ["id_card_network_logo_id"], name: "index_id_card_setups_on_id_card_network_logo_id"
t.index ["id_card_provider_section_id"], name: "index_id_card_setups_on_id_card_provider_section_id"
t.index ["id_card_rx_section_id"], name: "index_id_card_setups_on_id_card_rx_section_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|
@@ -254,17 +255,17 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_16_182836) do
t.index ["id_card_plan_id"], name: "index_members_on_id_card_plan_id"
end
add_foreign_key "id_card_exception_items", "id_card_exceptions"
add_foreign_key "id_card_exception_items", "id_card_network_logos"
add_foreign_key "id_card_exception_items", "id_card_provider_sections"
add_foreign_key "id_card_exceptions", "id_card_setups"
add_foreign_key "id_card_plan_benefits", "id_card_plans"
add_foreign_key "id_card_plans", "id_card_setups"
add_foreign_key "id_card_exception_items", "id_card_exceptions", column: "exception_id"
add_foreign_key "id_card_exception_items", "id_card_network_logos", column: "network_logo_id"
add_foreign_key "id_card_exception_items", "id_card_provider_sections", column: "provider_section_id"
add_foreign_key "id_card_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"
add_foreign_key "id_card_setups", "id_card_network_logos"
add_foreign_key "id_card_setups", "id_card_provider_sections"
add_foreign_key "id_card_setups", "id_card_rx_sections"
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"
end