7272뱅뱅
테이블 (18)
cards
- id — uuid — 기본 키 — NOT NULL
- title — text — NOT NULL
- description — text
- author_name — text
- price — integer
- quantity — integer
- created_at — timestamp — NOT NULL
- cover_image_url — text
- author_id — uuid — 외래 키 → users.id — NOT NULL
groups
- id — uuid — 기본 키 — NOT NULL
- name — text — NOT NULL
- group_image_url — text
- description — text
- created_at — timestamp — NOT NULL
- type — text
- provider_id — uuid — 외래 키 → users.id — NOT NULL
idols
- id — uuid — 기본 키 — NOT NULL
- name — text — NOT NULL
- idol_image_url — text
- description — text
- created_at — timestamp — NOT NULL
- group_id — uuid — 외래 키 → groups.id — NOT NULL
listings
- id — uuid — 기본 키 — NOT NULL
- unit_price — integer
- quantity — integer
- status — VARCHAR(255)
- created_at — timestamp
- updated_at — timestamp
- expires_at — timestamp
- seller_id — uuid — 외래 키 → users.id — NOT NULL
- nft_id — uuid — 외래 키 → nft.id — NOT NULL
nft
- id — uuid — 기본 키 — NOT NULL
- token_id — text
- price — integer
- cid — text
- hash — text
- chain_id — text
- standard — text
- owner_address — text
- card_id — uuid — 외래 키 → cards.id — NOT NULL
offer_settlements
- id — uuid — 기본 키 — NOT NULL
- price — numeric(38,18) — NOT NULL
- royalty_rate — numeric(18,9) — NOT NULL
- platform_fee_rate — numeric(18,9) — NOT NULL
- seller_amount — numeric(38,18) — NOT NULL
- payment_token — text — NOT NULL
- tx_hash — text
- settled_at — timestamp — NOT NULL
- created_at — timestamp — NOT NULL
- offer_id — uuid — 외래 키 → offers.id — NOT NULL
offers
- id — uuid — 기본 키 — NOT NULL
- type — VARCHAR(255)
- price — numeric(38,18) — NOT NULL
- expires_at — timestamp — NOT NULL
- quantity — integer — NOT NULL
- status — text — NOT NULL
- created_at — timestamp — NOT NULL
- updated_at — timestamp
- accepted_at — timestamp
- rejected_at — timestamp
- canceled_at — timestamp
- expired_at — timestamp
- seller_id — uuid — 외래 키 → users.id — NOT NULL
- buyer_id — uuid — 외래 키 → users.id — NOT NULL
- nft_id — uuid — 외래 키 → nft.id — NOT NULL
- card_id — uuid — 외래 키 → cards.id — NOT NULL
ownership
- user_id — uuid — 외래 키 → users.id — NOT NULL
- card_id — uuid — 외래 키 → cards.id — NOT NULL
- quantity — integer — NOT NULL
pack_composition
- id — uuid — 기본 키 — NOT NULL
- quantity — integer — NOT NULL
- probability — numeric(18,9)
- pack_id — uuid — 외래 키 → packs.id — NOT NULL
- card_id — uuid — 외래 키 → cards.id — NOT NULL
pack_orders
- id — uuid — 기본 키 — NOT NULL
- unit_price — numeric(38,18) — NOT NULL
- quantity — integer — NOT NULL
- total_price — numeric(38,18) — NOT NULL
- payment_token — text — NOT NULL
- status — text — NOT NULL
- payment_tx_hash — text
- created_at — timestamp — NOT NULL
- paid_at — timestamp
- canceled_at — timestamp
- refunded_at — timestamp
- pack_id — uuid — 외래 키 → packs.id — NOT NULL
- buyer_id — uuid — 외래 키 → users.id — NOT NULL
pack_reveal_items
- id — uuid — 기본 키 — NOT NULL
- nft_id — uuid
- rarity — text
- assigned_at — timestamp — NOT NULL
- tx_hash — text
- alt_card_id — uuid
- alt_token_id — text
- pack_reveal_id — uuid — 외래 키 → pack_reveals.id — NOT NULL
pack_reveals
- id — uuid — 기본 키 — NOT NULL
- buyer_id — uuid — NOT NULL
- slots — integer — NOT NULL
- vrf_request_id — text
- vrf_result — text
- reveal_tx_hash — text
- opened_at — timestamp — NOT NULL
- pack_order_id — uuid — 외래 키 → pack_orders.id — NOT NULL
packs
- id — uuid — 기본 키 — NOT NULL
- price — numeric(38,18) — NOT NULL
- slots — integer — NOT NULL
- starts_at — timestamp — NOT NULL
- ends_at — timestamp — NOT NULL
- reveal_at — timestamp
- per_wallet_limit — integer
- created_at — timestamp — NOT NULL
- provider_id — uuid — 외래 키 → users.id — NOT NULL
sales
- id — uuid — 기본 키 — NOT NULL
- ref_type — text — NOT NULL
- ref_id — uuid — NOT NULL
- buyer_address — text
- seller_address — text
- chain_id — integer
- network — text
- payment_token — text
- tx_hash — text
- quantity — integer
- status — text — NOT NULL
- completed_at — timestamp
- created_at — timestamp — NOT NULL
- buyer_id — uuid — 외래 키 → users.id — NOT NULL
- seller_id — uuid — 외래 키 → users.id — NOT NULL
- nft_id — uuid — 외래 키 → nft.id — NOT NULL
token_groups
- group_id — uuid — 외래 키 → groups.id — NOT NULL
- nft_id — uuid — 외래 키 → nft.id — NOT NULL
token_idols
- idol_id — uuid — 외래 키 → idols.id — NOT NULL
- nft_id — uuid — 외래 키 → nft.id — NOT NULL
users
- id — uuid — 기본 키 — NOT NULL
- name — text — NOT NULL
- email — text — NOT NULL
- role — ENUM — NOT NULL
- profile_image_url — text
- provider — text
- wallet_address — text
- created_at — timestamp — NOT NULL
- updated_at — timestamp
wallet
- id — uuid — 기본 키 — NOT NULL
- balance — numeric(38,18) — NOT NULL
- user_id — uuid — 외래 키 → users.id — NOT NULL