SavingBee

Tables (11)

cart

  • cart_id — BIGINT — Primary key
  • product_code — VARCHAR(50) — NOT NULL
  • product_type — ENUM('DEPOSIT', 'SAVINGS') — NOT NULL
  • bank_name — VARCHAR(100)
  • product_name — VARCHAR(100)
  • max_interest_rate — DECIMAL(5,2)
  • term_months — INT
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • user_id — BIGINT — Foreign key → users.user_id — 사용자 ID

deposit_interest_rates (예금 상품 금리 옵션)

  • rate_id — INT — Primary key — NOT NULL
  • intr_rate_type — VARCHAR(1)
  • save_trm — INT
  • intr_rate — DECIMAL(5,2)
  • intr_rate2 — DECIMAL(5,2)
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • fin_prdt_cd — VARCHAR(50) — Foreign key → deposit_products.fin_prdt_cd — NOT NULL

deposit_products (예금상품)

  • fin_prdt_cd — VARCHAR(50) — Primary key — NOT NULL
  • fin_prdt_nm — VARCHAR(200)
  • join_way — VARCHAR(100)
  • mtrt_int — VARCHAR(200)
  • spcl_cnd — TEXT
  • join_deny — VARCHAR(50)
  • join_member — VARCHAR(100)
  • etc_note — TEXT
  • max_limit — BIGINT
  • dcls_strt_day — DATE
  • dcls_end_day — DATE
  • is_active — BOOLEAN
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • fin_co_no (fin_co_no2) — VARCHAR(20) — Foreign key → financial_companies.fin_co_no — NOT NULL
  • min_amount — BIGINT
  • max_amount — BIGINT

financial_companies (금융회사)

  • fin_co_no — VARCHAR(20) — Primary key — NOT NULL
  • kor_co_nm — VARCHAR(100) — NOT NULL
  • trns_org_code — VARCHAR(10)
  • org_type_code — VARCHAR(10)
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

maturity_alarm_log (만기알림 로그)

  • alarm_id — BIGINT — Primary key — 알림 ID
  • notified_at — TIMESTAMP — NOT NULL — 알림 전송 시각
  • days_before_maturity (type) — VARCHAR(10) — NOT NULL — 알림 종류 (D-7, D-1)
  • sent — BOOLEAN — 알림 전송 성공 여부
  • created_at — TIMESTAMP
  • user_product_id (user_product.id) — BIGINT — Foreign key → user_product.user_product_id — 사용자 ID
  • user_id — BIGINT — Foreign key → users.user_id — 사용자 ID

product_alert_event (상품 알림 이벤트)

  • id (ID) — BIGINT — Primary key — NOT NULL
  • alert_setting_id — BIGINT — Foreign key → product_alert_setting.id — NOT NULL
  • trigger_type — ENUM('PRODUCT_CHANGE', 'MATURITY') — NOT NULL
  • product_kind — ENUM('DEPOSIT', 'SAVINGS') — NOT NULL
  • product_code — VARCHAR(50)
  • payload — LONGTEXT
  • dedupe_key — VARCHAR(255)
  • event_status — ENUM('READY', 'SENDING', 'SENT', 'FAILED') — NOT NULL
  • attempts — INT
  • last_error — VARCHAR(255)
  • send_not_before — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL
  • sent_at — TIMESTAMP

product_alert_setting (상품 알림 설정)

  • id (Key) — BIGINT — Primary key — NOT NULL
  • user_id (userId) — BIGINT — Foreign key → users.user_id — 사용자 ID
  • product_type_deposit — BOOLEAN — NOT NULL
  • product_type_saving — BOOLEAN — NOT NULL
  • min_interest_rate — DECIMAL(4,2)
  • interest_calc_simple — BOOLEAN — NOT NULL
  • interest_calc_compound — BOOLEAN — NOT NULL
  • max_save_term — INT
  • min_amount — BIGINT
  • max_limit — BIGINT
  • alert_type — ENUM('EMAIL', 'SMS', 'PUSH') — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP

savings_interest_rates (적금상품금리옵션)

  • rate_id — INT — Primary key — NOT NULL
  • intr_rate_type — VARCHAR(1)
  • rsrv_type — VARCHAR(1)
  • save_trm — INT
  • intr_rate — DECIMAL(5,2)
  • intr_rate2 — DECIMAL(5,2)
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • fin_prdt_cd — VARCHAR(50) — Foreign key → savings_products.fin_prdt_cd — NOT NULL
  • monthly_limit_min — BIGINT
  • monthly_limit_max — BIGINT

savings_products (적금 상품)

  • fin_prdt_cd — VARCHAR(50) — Primary key — NOT NULL
  • fin_prdt_nm — VARCHAR(200)
  • join_way — VARCHAR(100)
  • mtrt_int — VARCHAR(200)
  • spcl_cnd — TEXT
  • join_deny — VARCHAR(50)
  • join_member — VARCHAR(100)
  • etc_note — TEXT
  • max_limit — BIGINT
  • dcls_strt_day — DATE
  • dcls_end_day — DATE
  • is_active — BOOLEAN
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • fin_co_no — VARCHAR(20) — Foreign key → financial_companies.fin_co_no — NOT NULL

user_product (사용자 가입상품)

  • user_product_id — BIGINT — Primary key — 사용자 ID
  • bank_name — VARCHAR(100) — NOT NULL — 은행명 (예: 국민은행)
  • product_name — VARCHAR(100) — NOT NULL — 상품명 (예: 정기예금 12개월)
  • product_type — ENUM('DEPOSIT','SAVINGS')
  • interest_rate — DECIMAL(4, 2) — NOT NULL — 사용자 가입 금리 (%)
  • deposit_amount — BIGINT
  • term_months — INT
  • join_date — DATE — NOT NULL — 상품 가입일
  • maturity_date — DATE — NOT NULL — 상품 만기일
  • special_conditions — TEXT
  • is_active — BOOLEAN
  • created_at — TIMESTAMP — 등록 시각
  • updated_at — TIMESTAMP
  • user_id — BIGINT — Foreign key → users.user_id — 사용자 ID

users (사용자)

  • user_id — BIGINT — Primary key — 사용자 ID
  • username — VARCHAR(50)
  • password — VARCHAR(255) — NOT NULL — 암호화된 비밀번호
  • is_lock — TINYINT(1)
  • is_social — TINYINT(1)
  • social_provider_type — VARCHAR(30)
  • role_type — VARCHAR(20)
  • nickname — VARCHAR(50)
  • email — VARCHAR(100) — NOT NULL — 로그인 이메일 (중복 불가)
  • alarm — BOOLEAN — NOT NULL — 알림 ON/OFF 설정
  • created_date — TIMESTAMP — 가입일
  • updated_date — TIMESTAMP — 정보 수정일