fledge-erd

Tables (20)

account

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • bank_name — VARCHAR(50) — NOT NULL
  • balance — BIGINT — NOT NULL
  • balance_updated_at — DATETIME
  • created_at — DATETIME — NOT NULL

care_response

  • id — BIGINT — Primary key — NOT NULL
  • care_signal_id — BIGINT — Foreign key → care_signal.id — NOT NULL
  • input_type — VARCHAR(20) — NOT NULL
  • selected_value — VARCHAR(30)
  • input_text — TEXT
  • ai_reply — TEXT
  • created_at — DATETIME — NOT NULL

care_signal

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • money_cycle_id — BIGINT — Foreign key → money_cycle.id — NOT NULL
  • signal_type — VARCHAR(30) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • response_result — VARCHAR(30)
  • classification_source — VARCHAR(20)
  • detected_at — DATETIME — NOT NULL
  • recheck_at — DATETIME — NOT NULL
  • rechecked_at — DATETIME
  • resolved_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

counselor

  • id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • password_hash — VARCHAR(60) — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • phone — VARCHAR(20)
  • organization — VARCHAR(100)
  • region_code — CHAR(2)
  • is_active — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL

housing_checklist

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • template_type — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL

housing_checklist_item

  • id — BIGINT — Primary key — NOT NULL
  • checklist_id — BIGINT — Foreign key → housing_checklist.id — NOT NULL
  • content — TEXT — NOT NULL
  • due_date — DATE
  • memo — TEXT
  • done — BOOLEAN — NOT NULL
  • sort_order — INT — NOT NULL

housing_interest

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • notice_id — BIGINT — Foreign key → housing_notice.id — NOT NULL
  • created_at — DATETIME — NOT NULL

housing_notice

  • id — BIGINT — Primary key — NOT NULL
  • pblanc_id — VARCHAR(20) — NOT NULL
  • pblanc_nm — TEXT — NOT NULL
  • suply_instt_nm — VARCHAR(50)
  • house_ty_nm — VARCHAR(30)
  • suply_ty_nm — VARCHAR(30)
  • target_type — VARCHAR(20)
  • sttus_nm — VARCHAR(20)
  • before_pblanc_id — VARCHAR(20)
  • superseded — BOOLEAN — NOT NULL
  • rcrit_pblanc_de — DATE
  • begin_de — DATE — NOT NULL
  • end_de — DATE — NOT NULL
  • przwner_presnatn_de — DATE
  • refrnc — TEXT
  • url — TEXT
  • pc_url — TEXT
  • collected_at — DATETIME — NOT NULL

housing_notice_unit

  • id — BIGINT — Primary key — NOT NULL
  • notice_id — BIGINT — Foreign key → housing_notice.id — NOT NULL
  • house_sn — INT
  • hsmp_nm — VARCHAR(100)
  • brtc_nm — VARCHAR(30) — NOT NULL
  • signgu_nm — VARCHAR(30)
  • full_adres — TEXT
  • heat_mthd_nm — VARCHAR(30)
  • tot_hshld_co — INT
  • sum_suply_co — INT
  • rent_gtn — BIGINT
  • mt_rntchrg — INT
  • enty — BIGINT
  • surlus — BIGINT

member

  • id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • password_hash — VARCHAR(60) — NOT NULL
  • birth_date — DATE — NOT NULL
  • gender — VARCHAR(10) — NOT NULL
  • region_code — CHAR(2) — NOT NULL
  • region_sigungu — VARCHAR(30)
  • protection_status — VARCHAR(20) — NOT NULL
  • protection_end_date — DATE
  • protection_expected_end — DATE
  • protection_type — VARCHAR(20)
  • home_region_code — CHAR(2)
  • created_at — DATETIME — NOT NULL

member_subsidy

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • subsidy_id — BIGINT — Foreign key → subsidy.id — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL

member_survey

  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • household_size — INT
  • income_pct_bracket — INT
  • is_benefit_recipient — BOOLEAN
  • employment_status — VARCHAR(20)
  • employment_type — VARCHAR(20)
  • housing_type — VARCHAR(20)
  • updated_at — DATETIME — NOT NULL

member_survey_tag

  • tag — VARCHAR(30) — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member_survey.member_id — NOT NULL

money_cycle

  • id — BIGINT — Primary key — NOT NULL
  • schedule_id — BIGINT — Foreign key → money_schedule.id — NOT NULL
  • cycle_month — DATE — NOT NULL
  • expected_date — DATE — NOT NULL
  • expected_amount — BIGINT
  • status — VARCHAR(20) — NOT NULL
  • matched_transaction_id — BIGINT — Foreign key → transaction.id
  • actual_date — DATE
  • actual_amount — BIGINT
  • reminder_sent_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

money_schedule

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • direction — VARCHAR(3) — NOT NULL
  • type — VARCHAR(20) — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • expected_amount — BIGINT
  • expected_day — SMALLINT — NOT NULL
  • match_keyword — VARCHAR(100)
  • is_active — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

monthly_budget

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • budget_month — DATE — NOT NULL
  • total_amount — BIGINT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

referral_request

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • care_signal_id — BIGINT — Foreign key → care_signal.id
  • counselor_id — BIGINT — Foreign key → counselor.id
  • status — VARCHAR(20) — NOT NULL
  • reason — VARCHAR(30) — NOT NULL
  • risk_score_at_request — SMALLINT — NOT NULL
  • requested_at — DATETIME — NOT NULL
  • contacted_at — DATETIME
  • closed_at — DATETIME

subsidy

  • id — BIGINT — Primary key — NOT NULL
  • source — VARCHAR(30) — NOT NULL
  • external_id — VARCHAR(100) — NOT NULL
  • name — TEXT — NOT NULL
  • summary — TEXT
  • org_name — TEXT
  • category — TEXT
  • region_code — CHAR(2)
  • target_raw — TEXT
  • benefit_raw — TEXT
  • apply_method — TEXT
  • apply_deadline_raw — TEXT
  • detail_url — TEXT
  • min_age — INT
  • max_age — INT
  • income_pct_max — INT
  • protection_status_required — VARCHAR(20)
  • min_years_after_end — DECIMAL(4,1)
  • max_years_after_end — DECIMAL(4,1)
  • benefit_amount_krw — BIGINT
  • benefit_cycle — VARCHAR(20)
  • apply_deadline_date — DATE
  • exclusion_group — VARCHAR(50)
  • needs_manual_review — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL

subsidy_target_tag

  • tag — VARCHAR(30) — Primary key — NOT NULL
  • subsidy_id — BIGINT — Foreign key → subsidy.id — NOT NULL

transaction

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • account_id — BIGINT — Foreign key → account.id — NOT NULL
  • txn_date — DATE — NOT NULL
  • txn_type — VARCHAR(10) — NOT NULL
  • amount — BIGINT — NOT NULL
  • merchant_name — VARCHAR(100)
  • category — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL