luckyBikini

Tables (30)

ai_extraction_evidences

  • id — BIGINT — Primary key — NOT NULL
  • ai_extraction_id — BIGINT — Foreign key → ai_extractions.id — NOT NULL
  • evidence_type — VARCHAR(20) — NOT NULL
  • transcript_text — TEXT
  • storage_key — VARCHAR(1000)
  • mime_type — VARCHAR(100)
  • frame_timestamp_ms — BIGINT
  • retention_until — TIMESTAMP — NOT NULL
  • deleted_at — TIMESTAMP
  • anonymized_metrics — JSON
  • created_at — TIMESTAMP — NOT NULL

ai_extractions

  • id — BIGINT — Primary key — NOT NULL
  • live_id — BIGINT — Foreign key → lives.id — NOT NULL
  • initiated_by_user_id — BIGINT — Foreign key → users.id
  • approved_by_user_id — BIGINT — Foreign key → users.id
  • duplicate_of_extraction_id — BIGINT — Foreign key → ai_extractions.id
  • trigger_type — VARCHAR(20) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • captured_at — TIMESTAMP
  • draft_payload — JSON — NOT NULL
  • confidence_payload — JSON — NOT NULL
  • model_version — VARCHAR(100) — NOT NULL
  • prompt_version — VARCHAR(100) — NOT NULL
  • similarity_score — DECIMAL(6,5)
  • held_at — TIMESTAMP
  • approved_at — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

auth_identities

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • provider — VARCHAR(20) — NOT NULL
  • provider_subject — VARCHAR(255) — NOT NULL
  • password_hash — VARCHAR(255)
  • created_at — TIMESTAMP — NOT NULL
  • last_login_at — TIMESTAMP

conversation_participants

  • conversation_id — BIGINT — Foreign key → conversations.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • joined_at — TIMESTAMP — NOT NULL

conversations

  • id — BIGINT — Primary key — NOT NULL
  • conversation_type — VARCHAR(20) — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id
  • product_id — BIGINT — Foreign key → products.id
  • created_by_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • delete_at — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL

follows

  • follower_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • following_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • live_notification_enabled — TINYINT(1) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

live_chat_messages

  • id — BIGINT — Primary key — NOT NULL
  • live_id — BIGINT — Foreign key → lives.id — NOT NULL
  • sender_user_id — BIGINT — Foreign key → users.id
  • related_product_id — BIGINT — Foreign key → products.id
  • related_order_id — BIGINT — Foreign key → orders.id
  • message_type — VARCHAR(20) — NOT NULL
  • body — TEXT — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • body_deleted_at — TIMESTAMP

lives

  • id — BIGINT — Primary key — NOT NULL
  • host_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • title — VARCHAR(150) — NOT NULL
  • thumbnail_url — VARCHAR(1000)
  • livekit_room_name — VARCHAR(255) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • scheduled_at — TIMESTAMP
  • started_at — TIMESTAMP
  • ended_at — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

messages

  • id — BIGINT — Primary key — NOT NULL
  • conversation_id — BIGINT — Foreign key → conversations.id — NOT NULL
  • sender_user_id — BIGINT — Foreign key → users.id
  • message_type — VARCHAR(20) — NOT NULL
  • body — TEXT
  • attachment_storage_key — VARCHAR(1000)
  • created_at — TIMESTAMP — NOT NULL
  • body_deleted_at — TIMESTAMP

notifications

  • id — BIGINT — Primary key — NOT NULL
  • recipient_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • notification_type — VARCHAR(40) — NOT NULL
  • title — VARCHAR(200) — NOT NULL
  • body — VARCHAR(1000) — NOT NULL
  • target_type — VARCHAR(40)
  • target_id — BIGINT
  • dedupe_key — VARCHAR(255) — NOT NULL
  • sent_at — TIMESTAMP — NOT NULL
  • read_at — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL

order_status_histories

  • id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • changed_by_user_id — BIGINT — Foreign key → users.id
  • from_status — VARCHAR(30)
  • to_status — VARCHAR(30) — NOT NULL
  • reason — VARCHAR(500)
  • created_at — TIMESTAMP — NOT NULL

orders

  • id — BIGINT — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • buyer_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • seller_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • status — VARCHAR(30) — NOT NULL
  • product_title_snapshot — VARCHAR(200) — NOT NULL
  • product_image_snapshot — VARCHAR(1000)
  • amount — DECIMAL(15,2) — NOT NULL
  • shipping_fee — DECIMAL(15,2) — NOT NULL
  • currency — CHAR(3) — NOT NULL
  • reserved_at — TIMESTAMP — NOT NULL
  • paid_at — TIMESTAMP
  • received_at — TIMESTAMP
  • completed_at — TIMESTAMP
  • cancelled_at — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

payment_attempts

  • id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • provider — VARCHAR(30) — NOT NULL
  • provider_payment_key — VARCHAR(255)
  • idempotency_key — VARCHAR(255) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • requested_amount — DECIMAL(15,2) — NOT NULL
  • failure_code — VARCHAR(100)
  • failure_message — VARCHAR(500)
  • raw_response — JSON
  • requested_at — TIMESTAMP — NOT NULL
  • approved_at — TIMESTAMP
  • failed_at — TIMESTAMP

product_images

  • id — BIGINT — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • source_evidence_id — BIGINT — Foreign key → ai_extraction_evidences.id
  • image_type — VARCHAR(20) — NOT NULL
  • storage_key — VARCHAR(1000) — NOT NULL
  • display_order — SMALLINT — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

product_inquiries

  • id — BIGINT — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • author_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • parent_inquiry_id — BIGINT — Foreign key → product_inquiries.id
  • body — TEXT — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • hidden_at — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL

product_live_segments

  • id — BIGINT — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • live_id — BIGINT — Foreign key → lives.id — NOT NULL
  • vod_id — BIGINT — Foreign key → vods.id
  • introduced_at — TIMESTAMP — NOT NULL
  • start_offset_ms — BIGINT — NOT NULL
  • end_offset_ms — BIGINT
  • created_at — TIMESTAMP — NOT NULL

product_revisions

  • id — BIGINT — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • edited_by_user_id — BIGINT — Foreign key → users.id
  • revision_no — INT — NOT NULL
  • revision_source — VARCHAR(20) — NOT NULL
  • snapshot_payload — JSON — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

products

  • id — BIGINT — Primary key — NOT NULL
  • seller_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • origin_live_id — BIGINT — Foreign key → lives.id
  • source_ai_extraction_id — BIGINT — Foreign key → ai_extractions.id
  • title — VARCHAR(200) — NOT NULL
  • description — TEXT — NOT NULL
  • brand_name — VARCHAR(100)
  • category — VARCHAR(100)
  • color — VARCHAR(100)
  • material — VARCHAR(200)
  • size_label — VARCHAR(100)
  • condition_status — VARCHAR(30) — NOT NULL
  • defect_description — TEXT
  • price — DECIMAL(15,2) — NOT NULL
  • currency — CHAR(3) — NOT NULL
  • stock_quantity — SMALLINT — NOT NULL
  • visibility_status — VARCHAR(20) — NOT NULL
  • sale_status — VARCHAR(20) — NOT NULL
  • ai_generated — TINYINT(1) — NOT NULL
  • published_at — TIMESTAMP
  • deleted_at — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

recent_searches

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • query_text — VARCHAR(255) — NOT NULL
  • searched_at — TIMESTAMP — NOT NULL

reservations

  • id — BIGINT — Primary key — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • reserved_by_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • expires_at — TIMESTAMP — NOT NULL
  • released_at — TIMESTAMP
  • release_reason — VARCHAR(100)
  • created_at — TIMESTAMP — NOT NULL

review_reports

  • id — BIGINT — Primary key — NOT NULL
  • review_id — BIGINT — Foreign key → reviews.id — NOT NULL
  • reporter_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • processed_by_user_id — BIGINT — Foreign key → users.id
  • reason — VARCHAR(100) — NOT NULL
  • detail — TEXT
  • status — VARCHAR(20) — NOT NULL
  • action_note — TEXT
  • reported_at — TIMESTAMP — NOT NULL
  • processed_at — TIMESTAMP

reviews

  • id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • author_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • target_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • rating — SMALLINT — NOT NULL
  • body — TEXT — NOT NULL
  • visibility_status — VARCHAR(20) — NOT NULL
  • hidden_at — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL

shipments

  • id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • confirmed_by_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • carrier_code — VARCHAR(50)
  • tracking_number — VARCHAR(100)
  • shipped_at — TIMESTAMP — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

shipping_addresses

  • order_id — BIGINT — Foreign key → orders.id — NOT NULL
  • recipient_name — VARCHAR(100) — NOT NULL
  • phone — VARCHAR(30) — NOT NULL
  • postal_code — VARCHAR(20) — NOT NULL
  • address_line1 — VARCHAR(255) — NOT NULL
  • address_line2 — VARCHAR(255)
  • delivery_memo — VARCHAR(500)
  • created_at — TIMESTAMP — NOT NULL

user_brand_terms

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • term — VARCHAR(100) — NOT NULL
  • normalized_term — VARCHAR(100) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

user_profiles

  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • display_name — VARCHAR(50) — NOT NULL
  • profile_image_url — VARCHAR(1000)
  • bio — VARCHAR(500)
  • updated_at — TIMESTAMP — NOT NULL

users

  • id — BIGINT — Primary key — NOT NULL
  • account_status — VARCHAR(20) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL
  • deleted_at — TIMESTAMP

vods

  • id — BIGINT — Primary key — NOT NULL
  • live_id — BIGINT — Foreign key → lives.id — NOT NULL
  • egress_job_id — VARCHAR(255)
  • status — VARCHAR(20) — NOT NULL
  • visibility_status — VARCHAR(20) — NOT NULL
  • hls_storage_key — VARCHAR(1000)
  • mp4_storage_key — VARCHAR(1000)
  • duration_ms — BIGINT
  • recording_started_at — TIMESTAMP
  • recording_ended_at — TIMESTAMP
  • failure_reason — TEXT
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

webhook_events

  • id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.id
  • payment_attempt_id — BIGINT — Foreign key → payment_attempts.id
  • vod_id — BIGINT — Foreign key → vods.id
  • provider — VARCHAR(30) — NOT NULL
  • external_event_id — VARCHAR(255) — NOT NULL
  • event_type — VARCHAR(100) — NOT NULL
  • processing_status — VARCHAR(20) — NOT NULL
  • payload — JSON — NOT NULL
  • received_at — TIMESTAMP — NOT NULL
  • processed_at — TIMESTAMP
  • error_message — TEXT

wishlists

  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • created_at — TIMESTAMP — NOT NULL