7272뱅뱅

테이블 (18)

cards

  • id — uuid — 기본 키 — NOT NULL
  • title — text — NOT NULL
  • description — text
  • author_name — text
  • price — integer
  • quantity (Field2) — integer
  • created_at — timestamp — NOT NULL
  • cover_image_url (Field) — text
  • author_id (id2) — 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 (id2) — uuid — 외래 키 → groups.id — NOT NULL

listings (Untitled4)

  • id (Key) — uuid — 기본 키 — NOT NULL
  • unit_price (Field) — integer
  • quantity (Field2) — integer
  • status (Field3)
  • created_at (Field4) — timestamp
  • updated_at (Field5) — timestamp
  • expires_at (Field6) — timestamp
  • seller_id (id) — uuid — 외래 키 → users.id — NOT NULL
  • nft_id (Key2) — uuid — 외래 키 → nft.id — NOT NULL

nft (Untitled3)

  • id (Key) — uuid — 기본 키 — NOT NULL
  • token_id (Field) — text
  • price (Field7) — integer
  • cid (Field2) — text
  • hash (Field3) — text
  • chain_id (Field4) — text
  • standard (Field5) — text
  • owner_address (Field6) — text
  • card_id (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 (Field)
  • 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 (id3) — uuid — 외래 키 → users.id — NOT NULL
  • buyer_id (id4) — uuid — 외래 키 → users.id — NOT NULL
  • card_id (Key) — uuid — 외래 키 → nft.id — NOT NULL
  • id (id2) — 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 (id2) — 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 (id2) — 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 (id2) — 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 (Field) — integer
  • status — text — NOT NULL
  • completed_at — timestamp
  • created_at — timestamp — NOT NULL
  • buyer_id (id3) — uuid — 외래 키 → users.id — NOT NULL
  • seller_id (id4) — uuid — 외래 키 → users.id — NOT NULL
  • nft_id (Key) — uuid — 외래 키 → nft.id — NOT NULL

token_groups (Untitled2)

  • group_id (id) — uuid — 외래 키 → groups.id — NOT NULL
  • nft_id (Key) — uuid — 외래 키 → nft.id — NOT NULL

token_idols (Untitled)

  • idol_id (id) — uuid — 외래 키 → idols.id — NOT NULL
  • nft_id (Key) — 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
  • login_provider (provider) — text
  • wallet_address (Field) — text
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp

wallet

  • id — uuid — 기본 키 — NOT NULL
  • balance — numeric(38,18) — NOT NULL
  • user_id (id2) — uuid — 외래 키 → users.id — NOT NULL