ㅇㅇ
Tables (11)
blockchain_txs
- id — BIGINT
- reference_type — VARCHAR(50) — NOT NULL
- reference_id — BIGINT — NOT NULL
- tx_hash — VARCHAR(100)
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
charges
- id — BIGINT
- user_id — BIGINT — NOT NULL
- user_account_id — BIGINT — Foreign key → user_accounts.id — NOT NULL
- user_wallet_id — BIGINT — Foreign key → user_wallets.id — NOT NULL
- blockchain_tx_id — BIGINT — Foreign key → blockchain_txs.id
- charge_amount — DECIMAL(18, 2) — NOT NULL
- payment_amount — DECIMAL(18, 2) — NOT NULL
- discount_amount — DECIMAL(18, 2) — NOT NULL
- discount_rate — DECIMAL(5, 2) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
merchant_accounts
- id — BIGINT
- merchant_id — BIGINT — Foreign key → merchants.id — NOT NULL
- bank_code — VARCHAR(20) — NOT NULL
- account_number — VARCHAR(50) — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
merchant_wallets
- id — BIGINT
- merchant_id — BIGINT — Foreign key → merchants.id — NOT NULL
- address — VARCHAR(100) — NOT NULL
- encrypted_private_key — TEXT
- created_at — DATETIME
- updated_at — DATETIME
merchants
- id — BIGINT
- username — VARCHAR(50) — NOT NULL
- password_hash — VARCHAR(255) — NOT NULL
- business_number — VARCHAR(30) — NOT NULL
- merchant_name — VARCHAR(100) — NOT NULL
- owner_name — VARCHAR(50) — NOT NULL
- phone_number — VARCHAR(20)
- address — VARCHAR(255)
- latitude — DECIMAL(10, 7)
- longitude — DECIMAL(10, 7)
- created_at — DATETIME
- updated_at — DATETIME
payment_cancellations
- id — BIGINT
- payment_id — BIGINT — Foreign key → payments.id — NOT NULL
- merchant_id — BIGINT — Foreign key → merchants.id — NOT NULL
- blockchain_tx_id — BIGINT — Foreign key → blockchain_txs.id
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
payments
- id — BIGINT
- user_id — BIGINT — NOT NULL
- merchant_id — BIGINT — Foreign key → merchants.id — NOT NULL
- user_wallet_id — BIGINT — Foreign key → user_wallets.id — NOT NULL
- merchant_wallet_id — BIGINT — Foreign key → merchant_wallets.id — NOT NULL
- blockchain_tx_id — BIGINT — Foreign key → blockchain_txs.id
- amount — DECIMAL(18, 2) — NOT NULL
- approval_number — VARCHAR(50) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
refunds
- id — BIGINT
- user_id — BIGINT — NOT NULL
- user_account_id — BIGINT — Foreign key → user_accounts.id — NOT NULL
- user_wallet_id — BIGINT — Foreign key → user_wallets.id — NOT NULL
- payment_id — BIGINT — Foreign key → payments.id
- blockchain_tx_id — BIGINT — Foreign key → blockchain_txs.id
- refund_amount — DECIMAL(18, 2) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
user_accounts
- id — BIGINT
- user_id — BIGINT — NOT NULL
- bank_code — VARCHAR(20) — NOT NULL
- account_number — VARCHAR(50) — NOT NULL
- is_primary — BOOLEAN — NOT NULL
- created_at — DATETIME
- updated_at — DATETIME
user_wallets
- id — BIGINT
- user_id — BIGINT — NOT NULL
- address — VARCHAR(100) — NOT NULL
- encrypted_private_key — TEXT
- created_at — DATETIME
- updated_at — DATETIME
users
- user_id — BIGINT
- username — VARCHAR(50) — NOT NULL
- password_hash — VARCHAR(255) — NOT NULL
- phone_number — VARCHAR(20) — NOT NULL
- birth_date — DATE
- region — VARCHAR(50)
- created_at — DATETIME