payment

Tables (8)

account (Untitled6)

  • account_id (계좌 id) — bigint — Primary key — NOT NULL
  • customer_id (Key) — bigint — Foreign key → customer.customer_id — NOT NULL
  • Field

card (Untitled2)

  • card_id (카드 id) — bigint — Primary key — NOT NULL
  • account_id (계좌 id) — bigint — Foreign key → account.account_id — NOT NULL
  • limit (한도) — decimal(18,2)
  • available_balance (Field) — 이용 가능 잔액
  • product_id (카드 상품 id) — bigint
  • opend_at (카드 생성 일자) — datetime
  • created_at (Field3) — datetime
  • last_modified_at (Field4) — datetime

customer (Untitled7)

  • customer_id (Key) — bigint — Primary key — NOT NULL
  • Field

leder (Untitled5)

  • leder_id (Key) — bigint — Primary key — NOT NULL
  • transaction_id (거래 id) — bigint — Foreign key → transaction.transaction_id — NOT NULL
  • account_id (계좌 id) — bigint — Foreign key → account.account_id — NOT NULL
  • type (종류) — enum(debit, credit)
  • amout (금액) — decimal(18,2)
  • category (카테고리) — enum(customer, merchant, fee, settlement)
  • created_at (Field) — datetime
  • last_modified_at (Field5) — datetime

merchant (Untitled3)

  • merchant_id (가맹점 id) — bigint — Primary key — NOT NULL

settlement (Untitled4)

  • settlement_id (정산 id) — bigint — Primary key — NOT NULL
  • transaction_id (거래 id) — bigint — Foreign key → transaction.transaction_id — NOT NULL
  • merchant_id (가맹점 id) — bigint — Foreign key → merchant.merchant_id — NOT NULL
  • gross_amout (거래 금액) — decimal(18, 2)
  • fee_amout (수수료) — decimal(18, 2)
  • return_amout (반환 금액) — decimal(18, 2)
  • status (상태) — enum(scheduled, complete, failed)
  • scheduled_date (스케줄 날짜) — datetime
  • settlement_date (정산 날짜) — datetime
  • created_at (생성일) — datetime
  • last_modified_at (최종 수정일) — datetime

transaction (Untitled)

  • transaction_id (거래 id) — bigint — Primary key — NOT NULL
  • transaction_uuid (결제 id) — char
  • merchant_id (가맹점 id) — bigint — Foreign key → merchant.merchant_id — NOT NULL
  • card_id (car id) — bigint — Foreign key → card.card_id — NOT NULL
  • amout (금액) — DECIMAL(18, 2)
  • currency (통화) — char
  • status (거래 상태) — ENUM(request, pending, approval, declined,, canceled)
  • transaction_type (거래 종류) — ENUM(purchased , refund, cancel)
  • approval_code (승인 코드) — varchar
  • approval_at (승인 시점) — date_time
  • created_at (생성일자) — datetime
  • last_modified_at (수정일자) — datetime

transaction_log (Untitled8)

  • transaction_log_id (Key) — bigint — Primary key — NOT NULL
  • transaction_id (거래 id) — bigint — Foreign key → transaction.transaction_id — NOT NULL
  • prev_status (이전 상태) — enum
  • after_status (이후 상태) — enum
  • description (설명) — text
  • created_at (Field4) — datetime
  • last_modified_at (Field5) — datetime