Wirebarly

테이블 (4)

계좌 (account)

  • account_id (Key) — BIGINT — 기본 키 — NOT NULL — 계좌 ID
  • customer_id (Key2) — BIGINT — 외래 키 → 고객.customer_id — NOT NULL — 고객 ID
  • bank_code (Field) — VARCHAR — NOT NULL — 은행 코드( Enum)
  • account_number (Field2) — VARCHAR — NOT NULL — 계좌번호
  • status (Field3) — VARCHAR — NOT NULL — 계좌상태 (ACTIVE, CLOSED)
  • balance (Field5) — BIGINT — NOT NULL — 현재 잔액
  • created_at (Field6) — DATETIME — NOT NULL — 개설일자
  • updated_at (Field7) — DATETIME — NOT NULL — 수정일자
  • closed_at (Field4) — TIMESTAMP — 해지일자

계좌 거래내역 (account_transaction)

  • account_transaction_id (Key) — BIGINT — 기본 키 — NOT NULL — 거래 내역 ID
  • account_id (Key2) — BIGINT — 외래 키 → 계좌.account_id — NOT NULL — 대상 계좌 ID
  • transfer_id (Key3) — BIGINT — 외래 키 → 송금.transfer_id — 송금 ID (송금으로 인한 거래일 경우)
  • type (Field) — VARCHAR — NOT NULL — 거래 구분 (DEPOSIT, WITHDRAW))
  • transfer_type (Field2) — VARCHAR — NOT NULL — 송금 유형 (TRANSFER, TRANSFER_FEE, NONE)
  • amount (Field3) — VARCHAR — NOT NULL — 거래금액
  • balnce_after (Field5) — BIGINT — NOT NULL — 거래 후 잔액
  • transacted_at (Field6) — DATETIME — NOT NULL — 거래일자

고객 (customer)

  • customer_id (Key) — BIGINT — 기본 키 — NOT NULL — 고객 ID
  • name (Field) — VARCHAR — NOT NULL — 고객명
  • created_at (Field2) — DATETIME — NOT NULL — 생성일자
  • updated_at (Field3) — DATETIME — NOT NULL — 수정일자
  • deleted_at (Field4) — DATETIME — 삭제일자

송금 (transfer)

  • transfer_id (Key) — BIGINT — 기본 키 — NOT NULL — 송금 ID
  • from_account_id (Key2) — BIGINT — 외래 키 → 계좌.account_id — NOT NULL — 출금 계좌 ID
  • to_account_id (Key3) — BIGINT — 외래 키 → 계좌.account_id — NOT NULL — 입금 계좌 ID
  • amount (Field) — BIGINT — NOT NULL — 이체 금액
  • fee (Field2) — BIGINT — NOT NULL — 이체 수수료
  • transferred_at (Field3) — DATETIME — NOT NULL — 송금일자