7272뱅뱅
테이블 (15)
NFT 토큰 (nfts)
- NFT ID (id) — integer — 기본 키 — NOT NULL
- 온체인 토큰 ID (token_id) — text
- 트랜잭션 해시 (txhash) — text
- 원본 카드 ID (card_id) — integer — 외래 키 → 카드.카드 ID — NOT NULL
- 사용자 ID (user_id) — integer — 외래 키 → 사용자.사용자 ID — NOT NULL
- 아이돌 id (idol_id) — integer — 외래 키 → 아이돌.아이돌 id — NOT NULL
거래 기록 (transactions)
- 거래 ID (id) — integer — 기본 키 — NOT NULL
- 참조 타입 (ref_type) — text — NOT NULL
- 참조 ID (ref_id) — integer — NOT NULL
- 구매자 지갑 주소 (buyer_address) — text
- 판매자 지갑 주소 (seller_address) — text
- 체인 ID (chain_id) — integer
- 네트워크명 (network) — text
- 체결 트랜잭션 해시 (tx_hash) — text
- 수량 (quantity) — integer
- 상태 (status) — ENUM — NOT NULL
- 거래 완료 시각 (completed_at) — timestamp
- 생성 시각 (created_at) — timestamp — NOT NULL
- 구매자 ID (buyer_id) — integer — 외래 키 → 사용자.사용자 ID — NOT NULL
- 판매자 ID (seller_id) — integer — 외래 키 → 사용자.사용자 ID — NOT NULL
- NFT ID (nft_id) — integer — 외래 키 → NFT 토큰.NFT ID — NOT NULL
고정가 판매 (listings)
- 리스팅 ID (id) — integer — 기본 키 — NOT NULL
- 단가 (unit_price) — integer
- 수량 (quantity) — integer
- 상태 (status) — ENUM
- 생성 시각 (created_at) — timestamp
- 갱신 시각 (updated_at) — timestamp — NOT NULL
- 만료 시각 (expires_at) — timestamp — NOT NULL
- 판매자 ID (seller_id) — integer — 외래 키 → 사용자.사용자 ID — NOT NULL
- NFT ID (nft_id) — integer — 외래 키 → NFT 토큰.NFT ID — NOT NULL
그룹 (groups)
- 그룹 ID (id) — integer — 기본 키 — NOT NULL
- 그룹명 (name) — text — NOT NULL
- 대표 이미지 URL (group_image_url) — text
- 설명 (description) — text
- 생성 시각 (created_at) — timestamp — NOT NULL
리빌 결과 항목 (pack_reveal_items)
- 리빌 결과 항목 ID (id) — integer — 기본 키 — NOT NULL
- 배정 시각 (assigned_at) — timestamp — NOT NULL
- 배정 트랜잭션 해시 (tx_hash) — text
- 리빌 ID (pack_reveal_id) — integer — 외래 키 → 리빌 세션.리빌 세션 ID — NOT NULL
- NFT ID (nft_id) — integer — 외래 키 → NFT 토큰.NFT ID — NOT NULL
리빌 세션 (pack_reveals)
- 리빌 세션 ID (id) — integer — 기본 키 — NOT NULL
- 오픈한 사용자 ID (buyer_id) — integer — NOT NULL
- 오픈 개수 (slots) — integer — NOT NULL
- VRF 요청 ID (vrf_request_id) — text
- VRF 결과 (vrf_result) — text
- 리빌 트랜잭션 해시 (reveal_tx_hash) — text
- 리빌 실행 시각 (opened_at) — timestamp — NOT NULL
- 팩 주문 ID (pack_order_id) — integer — 외래 키 → 팩 주문.팩 주문 ID — NOT NULL
사용자 (users)
- 사용자 ID (id) — integer — 기본 키 — NOT NULL
- 이름 (name) — text — NOT NULL
- 이메일 (email) — text — NOT NULL
- 역할 (role) — ENUM — NOT NULL
- 프로필 이미지 버켓 (profile_image_bucket) — text
- 프로필 이미지 키 (profile_image_key) — text
- 소셜 로그인 업체 (provider) — text
- 기본 지갑 주소 (wallet_address) — text
- 지갑 개인키 (wallet_privateKey) — text
- 생성 시각 (created_at) — timestamp — NOT NULL
- 갱신 시각 (updated_at) — timestamp
아이돌 (idols)
- 아이돌 id (id) — integer — 기본 키 — NOT NULL
- 이름 (name) — text — NOT NULL
- 이미지 URL (idol_image_url) — text
- 설명 (description) — text
- 생성 시각 (created_at) — timestamp — NOT NULL
- 그룹명 (Field) — text
- 기획사 id (provider_id) — integer — 외래 키 → 사용자.사용자 ID — NOT NULL
오퍼 (offers)
- 오퍼 ID (id) — integer — 기본 키 — NOT NULL
- 유형 (type) — ENUM
- 제안 금액 (price) — numeric(38,18) — 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
- 판매자 ID (seller_id) — integer — 외래 키 → 사용자.사용자 ID — NOT NULL
- 구매자 ID (buyer_id) — integer — 외래 키 → 사용자.사용자 ID — NOT NULL
- NFT ID (nft_id) — integer — 외래 키 → NFT 토큰.NFT ID — NOT NULL
- 카드 ID (card_id) — integer — 외래 키 → 카드.카드 ID — NOT NULL
오퍼 정산 (offer_settlements)
- 오퍼 정산 ID (id) — integer — 기본 키 — 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
- 정산 트랜잭션 해시 (tx_hash) — text
- 정산 완료 시각 (settled_at) — timestamp — NOT NULL
- 생성 시각 (created_at) — timestamp — NOT NULL
- 오퍼 ID (offer_id) — integer — 외래 키 → 오퍼.오퍼 ID — NOT NULL
지갑 (wallets)
- 지갑 ID (id) — integer — 기본 키 — NOT NULL
- 잔액 (balance) — numeric(38,18) — NOT NULL
- 소유자 ID (user_id) — integer — 외래 키 → 사용자.사용자 ID — NOT NULL
카드 (cards)
- 카드 ID (id) — integer — 기본 키 — NOT NULL
- 제목 (title) — text — NOT NULL
- 설명 (description) — text
- 저자명 (author_name) — text
- 표시 가격 (price) — integer
- 수량 (quantity) — integer
- 생성 시각 (created_at) — timestamp — NOT NULL
- 커버 이미지 버켓 (cover_image_bucket) — text
- 커버 이미지 키 (cover_image_key) — text
- 영상 버켓 (video_bucket) — text
- 영상 키 (video_key) — text
- 영상 해시값 (video_sha256) — text
- 기획사 ID (author_id) — integer — 외래 키 → 사용자.사용자 ID — NOT NULL
팩 (packs)
- 팩 ID (id) — integer — 기본 키 — NOT NULL
- 제목 (name) — text
- 판매가격 (price) — numeric(38,18) — NOT NULL
- 전체 팩 개수 (quantity) — integer — NOT NULL
- 설명 (description) — text
- 커버 이미지 버켓 (cover_image_bucket) — text
- 커버 이미지 key (cover_image_key) — text
- 판매 시작 시간 (starts_at) — timestamp
- 판매 종료 시간 (ends_at) — timestamp
- 개인당 구매 한도 (per_wallet_limit) — integer
- 생성 시각 (created_at) — timestamp — NOT NULL
- 제공자 ID (provider_id) — integer — 외래 키 → 사용자.사용자 ID — NOT NULL
팩 구성 (pack_composition)
- 팩 구성 ID (id) — integer — 기본 키 — NOT NULL
- 전체 수량 (quantity) — integer — NOT NULL
- 현 수량 (current_quantiity) — integer
- 확률 (probability) — numeric(18,9)
- 카드 ID (card_id) — integer — 외래 키 → 카드.카드 ID — NOT NULL
- 팩 ID (pack_id) — integer — 외래 키 → 팩.팩 ID — NOT NULL
팩 주문 (pack_orders)
- 팩 주문 ID (id) — integer — 기본 키 — 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) — ENUM — NOT NULL
- 결제 트랜잭션 해시 (payment_tx_hash) — text
- 생성 시각 (created_at) — timestamp — NOT NULL
- 결제 완료 시각 (paid_at) — timestamp
- 취소 시각 (canceled_at) — timestamp
- 환불 시각 (refunded_at) — timestamp
- 팩 ID (pack_id) — integer — 외래 키 → 팩.팩 ID — NOT NULL
- 구매자 ID (buyer_id) — integer — 외래 키 → 사용자.사용자 ID — NOT NULL