dd
Tables (28)
chain_contract
- id — BIGINT — Primary key — NOT NULL
- chain_id — BIGINT — NOT NULL
- contract_address — VARCHAR(120) — NOT NULL
- standard — ENUM('ERC721','ERC1155') — NOT NULL
- name — VARCHAR(80)
- created_at — DATETIME — NOT NULL
chain_event_processed
- id — BIGINT — Primary key — NOT NULL
- chain_id — BIGINT — NOT NULL
- tx_hash — VARCHAR(120) — NOT NULL
- log_index — INT — NOT NULL
- contract_id — BIGINT — Foreign key → chain_contract.id — NOT NULL
- event_sig — VARCHAR(100) — NOT NULL
- processed_at — DATETIME — NOT NULL
chain_indexer_state
- id — BIGINT — Primary key — NOT NULL
- chain_id — BIGINT — NOT NULL
- contract_id — BIGINT — Foreign key → chain_contract.id
- last_processed_block — BIGINT — NOT NULL
- last_processed_at — DATETIME
- status — ENUM('RUNNING','PAUSED','ERROR') — NOT NULL
- error_message — VARCHAR(255)
- updated_at — DATETIME — NOT NULL
chain_tx
- id — BIGINT — Primary key — NOT NULL
- chain_id — BIGINT — NOT NULL
- tx_hash — VARCHAR(120) — NOT NULL
- tx_type — ENUM('MINT','TRANSFER','REFUND','RESALE_SETTLE') — NOT NULL
- status — ENUM('PENDING','SUBMITTED','CONFIRMED','FAILED') — NOT NULL
- from_wallet_id — BIGINT — Foreign key → wallets.id
- to_wallet_id — BIGINT — Foreign key → wallets.id
- order_id — BIGINT — Foreign key → purchase_order.id
- resale_trade_id — BIGINT — Foreign key → resale_trade.id
- transfer_id — BIGINT — Foreign key → ticket_transfer.id
- refund_request_id — BIGINT — Foreign key → refund_request.id
- block_number — BIGINT
- block_timestamp — DATETIME
- raw_event_json — JSON
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
check_in_log
- id — BIGINT — Primary key — NOT NULL
- seat_ticket_id — BIGINT — Foreign key → seat_ticket.id
- scanned_at — DATETIME — NOT NULL
- gate — VARCHAR(40)
- result — ENUM('SUCCESS','DUPLICATE','INVALID','CANCELED') — NOT NULL
- memo — VARCHAR(200)
hosts
- id — BIGINT — Primary key — NOT NULL
- wallet_id — BIGINT — Foreign key → wallets.id — NOT NULL
- company_name — VARCHAR(80) — NOT NULL
- business_no — VARCHAR(50) — NOT NULL
- email — VARCHAR(120) — NOT NULL
- password_hash — VARCHAR(255) — NOT NULL
- status — ENUM('ACTIVE','SUSPENDED') — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
likes
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- show_id — BIGINT — Foreign key → shows.id — NOT NULL
- created_at — DATETIME — NOT NULL
notification
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- message — TEXT
- is_read — TINYINT(1) — NOT NULL
- type — VARCHAR(50) — NOT NULL
- created_at — DATETIME — NOT NULL
order_item
- id — BIGINT — Primary key — NOT NULL
- order_id — BIGINT — Foreign key → purchase_order.id — NOT NULL
- item_type — ENUM('SEAT','QTY') — NOT NULL
- ticket_type_id — BIGINT — Foreign key → ticket_type.id — NOT NULL
- seat_id — BIGINT — Foreign key → seat.id
- qty — BIGINT — NOT NULL
- unit_price — BIGINT — NOT NULL
- amount — BIGINT — NOT NULL
- created_at — DATETIME — NOT NULL
purchase_order
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- session_id — BIGINT — Foreign key → sessions.id — NOT NULL
- service_wallet_id — BIGINT — Foreign key → service_wallet.id — NOT NULL
- status — ENUM('CREATED','HOLDING','ONCHAIN_SUBMITTED','ONCHAIN_CONFIRMED','FAILED','CANCELED','EXPIRED') — NOT NULL
- total_amount — BIGINT — NOT NULL
- currency — VARCHAR(10) — NOT NULL
- expires_at — DATETIME
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
qty_ticket_balance
- id — BIGINT — Primary key — NOT NULL
- show_id — BIGINT — Foreign key → shows.id — NOT NULL
- session_id — BIGINT — Foreign key → sessions.id — NOT NULL
- owner_user_id — BIGINT — Foreign key → users.id — NOT NULL
- ticket_type_id — BIGINT — Foreign key → ticket_type.id — NOT NULL
- contract_id — BIGINT — Foreign key → chain_contract.id — NOT NULL
- token_id — BIGINT — NOT NULL
- amount — BIGINT — NOT NULL
- updated_at — DATETIME — NOT NULL
refund_policy
- id — BIGINT — Primary key — NOT NULL
- show_id — BIGINT — Foreign key → shows.id — NOT NULL
- days_remaining — INT — NOT NULL
- refund_rate — INT — NOT NULL
- fee_description — VARCHAR(200)
- created_at — DATETIME — NOT NULL
refund_request
- id — BIGINT — Primary key — NOT NULL
- order_id — BIGINT — Foreign key → purchase_order.id
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- service_wallet_id — BIGINT — Foreign key → service_wallet.id — NOT NULL
- amount — BIGINT — NOT NULL
- reason — VARCHAR(255)
- status — ENUM('REQUESTED','ONCHAIN_SUBMITTED','ONCHAIN_CONFIRMED','REJECTED','FAILED') — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
resale_listing
- id — BIGINT — Primary key — NOT NULL
- listing_type — ENUM('SEAT','QTY') — NOT NULL
- seat_ticket_id — BIGINT — Foreign key → seat_ticket.id
- ticket_type_id — BIGINT — Foreign key → ticket_type.id — NOT NULL
- session_id — BIGINT — Foreign key → sessions.id — NOT NULL
- seller_user_id — BIGINT — Foreign key → users.id — NOT NULL
- price — BIGINT — NOT NULL
- qty — BIGINT
- status — ENUM('LISTED','CANCELED','SOLD') — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
resale_trade
- id — BIGINT — Primary key — NOT NULL
- listing_id — BIGINT — Foreign key → resale_listing.id — NOT NULL
- buyer_user_id — BIGINT — Foreign key → users.id — NOT NULL
- service_wallet_id — BIGINT — Foreign key → service_wallet.id — NOT NULL
- price — BIGINT — NOT NULL
- qty — BIGINT
- status — ENUM('CREATED','ONCHAIN_SUBMITTED','ONCHAIN_CONFIRMED','FAILED','CANCELED') — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
seat
- id — BIGINT — Primary key — NOT NULL
- venue_id — BIGINT — Foreign key → venues.id — NOT NULL
- seat_no — VARCHAR(20) — NOT NULL
- row_num — INT — NOT NULL
- col_num — INT — NOT NULL
- created_at — DATETIME — NOT NULL
seat_ticket
- id — BIGINT — Primary key — NOT NULL
- order_item_id — BIGINT — Foreign key → order_item.id — NOT NULL
- show_id — BIGINT — Foreign key → shows.id — NOT NULL
- session_id — BIGINT — Foreign key → sessions.id — NOT NULL
- owner_user_id — BIGINT — Foreign key → users.id — NOT NULL
- ticket_type_id — BIGINT — Foreign key → ticket_type.id — NOT NULL
- seat_id — BIGINT — Foreign key → seat.id — NOT NULL
- contract_id — BIGINT — Foreign key → chain_contract.id — NOT NULL
- token_id — BIGINT — NOT NULL
- status — ENUM('ISSUED','CANCELED','USED') — NOT NULL
- qr_payload — VARCHAR(255) — NOT NULL
- issued_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
service_wallet
- id — BIGINT — Primary key — NOT NULL
- wallet_id — BIGINT — Foreign key → wallets.id — NOT NULL
- purpose — ENUM('TREASURY','FEE_COLLECTOR','ESCROW') — NOT NULL
- is_active — TINYINT(1) — NOT NULL
- created_at — DATETIME — NOT NULL
session_seat_inventory
- session_id — BIGINT — Foreign key → sessions.id — NOT NULL
- seat_id — BIGINT — Foreign key → seat.id — NOT NULL
- ticket_type_id — BIGINT — Foreign key → ticket_type.id — NOT NULL
- status — ENUM('AVAILABLE','HOLD','SOLD','BLOCKED') — NOT NULL
- hold_expires_at — DATETIME
- updated_at — DATETIME — NOT NULL
sessions
- id — BIGINT — Primary key — NOT NULL
- show_id — BIGINT — Foreign key → shows.id — NOT NULL
- starts_at — DATETIME — NOT NULL
- ends_at — DATETIME — NOT NULL
- status — ENUM('SCHEDULED','OPEN','CLOSED','CANCELED') — NOT NULL
- created_at — DATETIME — NOT NULL
shows
- id — BIGINT — Primary key — NOT NULL
- host_id — BIGINT — Foreign key → hosts.id — NOT NULL
- venue_id — BIGINT — Foreign key → venues.id — NOT NULL
- title — VARCHAR(100) — NOT NULL
- poster_url — VARCHAR(300) — NOT NULL
- description — TEXT — NOT NULL
- show_start_date — DATETIME — NOT NULL
- show_end_date — DATETIME — NOT NULL
- reservation_start_date — DATETIME — NOT NULL
- reservation_end_date — DATETIME — NOT NULL
- purchase_limit — INT — NOT NULL
- status — ENUM('DRAFT','OPEN','CLOSED','CANCELED') — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
stakeholder
- id — BIGINT — Primary key — NOT NULL
- show_id — BIGINT — Foreign key → shows.id — NOT NULL
- role — VARCHAR(50) — NOT NULL
- name — VARCHAR(100) — NOT NULL
- business_no — VARCHAR(50)
- phone_number — VARCHAR(20)
- share_bps — INT — NOT NULL
- created_at — DATETIME — NOT NULL
ticket_token_mapping
- id — BIGINT — Primary key — NOT NULL
- ticket_type_id — BIGINT — Foreign key → ticket_type.id — NOT NULL
- contract_id — BIGINT — Foreign key → chain_contract.id — NOT NULL
- token_id — BIGINT
- mint_rule — ENUM('PER_SEAT','FIXED_TOKEN_ID') — NOT NULL
- max_supply — BIGINT
- created_at — DATETIME — NOT NULL
ticket_transfer
- id — BIGINT — Primary key — NOT NULL
- transfer_type — ENUM('SEAT','QTY') — NOT NULL
- seat_ticket_id — BIGINT — Foreign key → seat_ticket.id
- ticket_type_id — BIGINT — Foreign key → ticket_type.id — NOT NULL
- session_id — BIGINT — Foreign key → sessions.id — NOT NULL
- from_user_id — BIGINT — Foreign key → users.id — NOT NULL
- to_user_id — BIGINT — Foreign key → users.id — NOT NULL
- qty — BIGINT
- service_wallet_id — BIGINT — Foreign key → service_wallet.id — NOT NULL
- status — ENUM('REQUESTED','ONCHAIN_SUBMITTED','ONCHAIN_CONFIRMED','CANCELED','FAILED') — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
ticket_type
- id — BIGINT — Primary key — NOT NULL
- show_id — BIGINT — Foreign key → shows.id — NOT NULL
- name — VARCHAR(60) — NOT NULL
- is_seated — TINYINT(1) — NOT NULL
- display_price — BIGINT — NOT NULL
- currency — VARCHAR(10) — NOT NULL
- resale_allowed — TINYINT(1) — NOT NULL
- resale_markup_bps — INT — NOT NULL
- created_at — DATETIME — NOT NULL
users
- id — BIGINT — Primary key — NOT NULL
- wallet_id — BIGINT — Foreign key → wallets.id — NOT NULL
- username — VARCHAR(40) — NOT NULL
- phone_number — VARCHAR(20) — NOT NULL
- email — VARCHAR(120) — NOT NULL
- password_hash — VARCHAR(255) — NOT NULL
- status — ENUM('ACTIVE','SUSPENDED','DELETED') — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
venues
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(120) — NOT NULL
- address — VARCHAR(255) — NOT NULL
- region — ENUM('서울','부울경','구미','대전','광주') — NOT NULL
- created_at — DATETIME — NOT NULL
wallets
- id — BIGINT — Primary key — NOT NULL
- address — VARCHAR(120) — NOT NULL
- created_at — DATETIME — NOT NULL