ㅇㅇㅇ
Tables (11)
CreditPaymentHistory
- credit_payment_id — BIGINT
- payment_id — BIGINT — Foreign key → Payment.payment_id — NOT NULL
- wallet_transaction_id — BIGINT — Foreign key → WalletTransaction.wallet_transaction_id — NOT NULL
- credit_price_id — BIGINT — Foreign key → CreditPrice.credit_price_id — NOT NULL
- purchased_credit — INT — NOT NULL
- bonus_credit — INT
- balance_before — DECIMAL(15,2) — NOT NULL
- balance_after — DECIMAL(15,2) — NOT NULL
- approved_at — DATETIME
CreditPrice
- credit_price_id — BIGINT
- product_name — VARCHAR(100) — NOT NULL
- credit_amount — INT — NOT NULL
- bonus_credit — INT
- price — DECIMAL(15,2) — NOT NULL
- currency_id — BIGINT — Foreign key → Currency.currency_id — NOT NULL
- is_active — CHAR(1)
- display_order — INT
- created_at — DATETIME
- updated_at — DATETIME
CreditRefundHistory
- credit_refund_id — BIGINT
- credit_payment_id — BIGINT — Foreign key → CreditPaymentHistory.credit_payment_id — NOT NULL
- wallet_transaction_id — BIGINT — Foreign key → WalletTransaction.wallet_transaction_id — NOT NULL
- refund_amount — DECIMAL(15,2) — NOT NULL
- refund_credit — INT — NOT NULL
- balance_before — DECIMAL(15,2) — NOT NULL
- balance_after — DECIMAL(15,2) — NOT NULL
- refund_reason — VARCHAR(255)
- refund_status — ENUM( 'REQUESTED', 'APPROVED', 'REJECTED', 'COMPLETED' ) — NOT NULL
- refunded_at — DATETIME
Currency
- currency_id — BIGINT
- code — VARCHAR(10) — NOT NULL
- name — VARCHAR(50) — NOT NULL
- symbol — VARCHAR(10)
- is_active — CHAR(1)
- created_at — DATETIME
- updated_at — DATETIME
Member
- member_id — BIGINT
- name — VARCHAR(100) — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- phone — VARCHAR(20)
- nick_name — VARCHAR(100)
- birth_date — DATE
- gender — CHAR(1)
- created_at — DATETIME
- updated_at — DATETIME
Payment
- payment_id — BIGINT
- wallet_id — BIGINT — Foreign key → Wallet.wallet_id — NOT NULL
- status — ENUM( 'PENDING', 'PAID', 'FAILED', 'CANCELLED', 'REFUNDED' ) — NOT NULL
- currency_id — BIGINT — Foreign key → Currency.currency_id — NOT NULL
- paid_amount — DECIMAL(15,2) — NOT NULL
- payment_provider — VARCHAR(50)
- external_transaction_id — VARCHAR(100)
- created_at — DATETIME
- updated_at — DATETIME
RatingHistory
- rating_history_id — BIGINT
- review_id — BIGINT — Foreign key → Review.review_id — NOT NULL
- member_id — BIGINT — Foreign key → Member.member_id — NOT NULL
- rating_score — TINYINT — NOT NULL
- changed_at — DATETIME
Review
- review_id — BIGINT
- member_id — BIGINT — Foreign key → Member.member_id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- content — TEXT
- /* — 실제
- view_count — INT
- like_count — INT
- comment_count — INT
- rating_score — TINYINT
- created_at — DATETIME
- updated_at — DATETIME
Wallet
- wallet_id — BIGINT
- member_id — BIGINT — Foreign key → Member.member_id — NOT NULL
- currency_id — BIGINT — Foreign key → Currency.currency_id — NOT NULL
- wallet_status — ENUM( 'ACTIVE', 'LOCKED', 'SUSPENDED' )
- created_at — DATETIME
- updated_at — DATETIME
WalletBalance
- wallet_balance_id — BIGINT
- wallet_id — BIGINT — Foreign key → Wallet.wallet_id — NOT NULL
- total_balance — DECIMAL(15,2)
- available_balance — DECIMAL(15,2)
- locked_balance — DECIMAL(15,2)
- last_changed_at — DATETIME
WalletTransaction
- wallet_transaction_id — BIGINT
- wallet_balance_id — BIGINT — Foreign key → WalletBalance.wallet_balance_id — NOT NULL
- transaction_type — ENUM( 'CHARGE', 'PAYMENT', 'REFUND', 'ADJUST', 'LOCK', 'UNLOCK' ) — NOT NULL
- related_table — VARCHAR(50)
- related_id — BIGINT
- amount — DECIMAL(15,2) — NOT NULL
- balance_before — DECIMAL(15,2) — NOT NULL
- balance_after — DECIMAL(15,2) — NOT NULL
- description — VARCHAR(255)
- created_at — DATETIME