SSAFESTA

Tables (29)

ai_agents

  • id — BIGINT — Primary key — NOT NULL
  • booth_id — BIGINT — Foreign key → booths.id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • role_code — VARCHAR(50) — NOT NULL
  • tone_code — VARCHAR(30) — NOT NULL
  • system_prompt — TEXT — NOT NULL
  • response_length — VARCHAR(20) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL
  • handoff_enabled — BOOLEAN — NOT NULL
  • forbidden_topics — JSONB

ai_document_chunks

  • id — BIGINT — Primary key — NOT NULL
  • document_id — BIGINT — Foreign key → ai_documents.id — NOT NULL
  • booth_id — BIGINT — Foreign key → booths.id — NOT NULL
  • agent_id — BIGINT — Foreign key → ai_agents.id — NOT NULL
  • chunk_no — INTEGER — NOT NULL
  • content — TEXT — NOT NULL
  • embedding — VECTOR(1536)
  • embedding_model_id — VARCHAR(100) — NOT NULL
  • metadata — JSONB
  • created_at — TIMESTAMPTZ — NOT NULL

ai_documents

  • id — BIGINT — Primary key — NOT NULL
  • booth_id — BIGINT — Foreign key → booths.id — NOT NULL
  • agent_id — BIGINT — Foreign key → ai_agents.id — NOT NULL
  • original_filename — VARCHAR(255) — NOT NULL
  • content_type — VARCHAR(100) — NOT NULL
  • size_bytes — BIGINT — NOT NULL
  • s3_key — VARCHAR(1024) — NOT NULL
  • processing_status — VARCHAR(30) — NOT NULL
  • uploaded_by_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

booth_daily_metrics

  • id — BIGINT — Primary key — NOT NULL
  • booth_id — BIGINT — Foreign key → booths.id — NOT NULL
  • metric_date — DATE — NOT NULL
  • visit_count — INTEGER — NOT NULL
  • ai_conversation_count — INTEGER — NOT NULL
  • survey_response_count — INTEGER — NOT NULL
  • consultation_count — INTEGER — NOT NULL
  • project_like_count — INTEGER — NOT NULL
  • revenue_coin — INTEGER — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

booth_layout_drafts

  • booth_id — BIGINT — Foreign key → booths.id — NOT NULL
  • schema_version — INTEGER — NOT NULL
  • layout_json — JSONB — NOT NULL
  • revision — BIGINT — NOT NULL
  • updated_by_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

booth_layout_published_versions

  • id — BIGINT — Primary key — NOT NULL
  • booth_id — BIGINT — Foreign key → booths.id — NOT NULL
  • version_no — INTEGER — NOT NULL
  • schema_version — INTEGER — NOT NULL
  • layout_json — JSONB — NOT NULL
  • published_by_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • published_at — TIMESTAMPTZ — NOT NULL

booth_leases

  • id — BIGINT — Primary key — NOT NULL
  • booth_id — BIGINT — Foreign key → booths.id — NOT NULL
  • slot_id — BIGINT — Foreign key → booth_slots.id — NOT NULL
  • lessee_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • starts_at — TIMESTAMPTZ — NOT NULL
  • ends_at — TIMESTAMPTZ — NOT NULL
  • charged_coin — INTEGER — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

booth_slots

  • id — BIGINT — Primary key — NOT NULL
  • slot_code — VARCHAR(30) — NOT NULL
  • floor_no — SMALLINT — NOT NULL
  • slot_type — VARCHAR(30) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

booth_staffs

  • booth_id — BIGINT — Foreign key → booths.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • role — VARCHAR(30) — NOT NULL
  • joined_at — TIMESTAMPTZ — NOT NULL

booth_visit_events

  • id — BIGINT — Primary key — NOT NULL
  • booth_id — BIGINT — Foreign key → booths.id — NOT NULL
  • visitor_user_id — BIGINT — Foreign key → users.id
  • world_channel — VARCHAR(50) — NOT NULL
  • entered_at — TIMESTAMPTZ — NOT NULL
  • exited_at — TIMESTAMPTZ

booths

  • id — BIGINT — Primary key — NOT NULL
  • owner_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • current_slot_id — BIGINT — Foreign key → booth_slots.id
  • name — VARCHAR(100) — NOT NULL
  • description — TEXT
  • facade_code — VARCHAR(50) — NOT NULL
  • homepage_url — VARCHAR(2048)
  • status — VARCHAR(20) — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

catalog_items

  • id — BIGINT — Primary key — NOT NULL
  • item_code — VARCHAR(50) — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • item_type — VARCHAR(30) — NOT NULL
  • equip_slot — VARCHAR(30)
  • price — INTEGER — NOT NULL
  • asset_key — VARCHAR(255) — NOT NULL
  • is_stackable — BOOLEAN — NOT NULL
  • is_on_sale — BOOLEAN — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

coin_ledger_entries

  • id — BIGINT — Primary key — NOT NULL
  • wallet_id — BIGINT — Foreign key → wallets.id — NOT NULL
  • entry_type — VARCHAR(20) — NOT NULL
  • amount — INTEGER — NOT NULL
  • balance_after — INTEGER — NOT NULL
  • reason_type — VARCHAR(40) — NOT NULL
  • reference_type — VARCHAR(40)
  • reference_id — VARCHAR(100)
  • idempotency_key — VARCHAR(100) — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

consultation_messages

  • id — BIGINT — Primary key — NOT NULL
  • consultation_id — BIGINT — Foreign key → consultations.id — NOT NULL
  • sender_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • content — TEXT — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

consultations

  • id — BIGINT — Primary key — NOT NULL
  • booth_id — BIGINT — Foreign key → booths.id — NOT NULL
  • visitor_user_id — BIGINT — Foreign key → users.id
  • agent_id — BIGINT — Foreign key → ai_agents.id
  • staff_user_id — BIGINT — Foreign key → users.id
  • ai_conversation_id — VARCHAR(100)
  • summary — TEXT
  • status — VARCHAR(20) — NOT NULL
  • requested_at — TIMESTAMPTZ — NOT NULL
  • accepted_at — TIMESTAMPTZ
  • ended_at — TIMESTAMPTZ

minigame_sessions

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • game_type — VARCHAR(30) — NOT NULL
  • nonce — UUID — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • target_value — NUMERIC(8,3) — NOT NULL
  • result_value — NUMERIC(8,3)
  • reward_coin — INTEGER — NOT NULL
  • reward_ledger_entry_id — BIGINT — Foreign key → coin_ledger_entries.id
  • started_at — TIMESTAMPTZ — NOT NULL
  • completed_at — TIMESTAMPTZ

oauth_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
  • created_at — TIMESTAMPTZ — NOT NULL

project_likes

  • project_id — BIGINT — Foreign key → projects.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

projects

  • id — BIGINT — Primary key — NOT NULL
  • booth_id — BIGINT — Foreign key → booths.id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • description — TEXT
  • thumbnail_url — VARCHAR(2048)
  • video_url — VARCHAR(2048)
  • deploy_url — VARCHAR(2048)
  • git_url — VARCHAR(2048)
  • portfolio_url — VARCHAR(2048)
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

staff_invitations

  • id — BIGINT — Primary key — NOT NULL
  • booth_id — BIGINT — Foreign key → booths.id — NOT NULL
  • invited_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • role — VARCHAR(30) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • invited_by_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • expires_at — TIMESTAMPTZ — NOT NULL
  • accepted_at — TIMESTAMPTZ
  • created_at — TIMESTAMPTZ — NOT NULL

survey_answer_options

  • answer_id — BIGINT — Foreign key → survey_answers.id — NOT NULL
  • option_id — BIGINT — Foreign key → survey_options.id — NOT NULL

survey_answers

  • id — BIGINT — Primary key — NOT NULL
  • response_id — BIGINT — Foreign key → survey_responses.id — NOT NULL
  • question_id — BIGINT — Foreign key → survey_questions.id — NOT NULL
  • text_answer — TEXT
  • rating_value — SMALLINT

survey_options

  • id — BIGINT — Primary key — NOT NULL
  • question_id — BIGINT — Foreign key → survey_questions.id — NOT NULL
  • option_text — VARCHAR(500) — NOT NULL
  • display_order — SMALLINT — NOT NULL

survey_questions

  • id — BIGINT — Primary key — NOT NULL
  • survey_id — BIGINT — Foreign key → surveys.id — NOT NULL
  • question_type — VARCHAR(30) — NOT NULL
  • question_text — TEXT — NOT NULL
  • is_required — BOOLEAN — NOT NULL
  • display_order — SMALLINT — NOT NULL

survey_responses

  • id — BIGINT — Primary key — NOT NULL
  • survey_id — BIGINT — Foreign key → surveys.id — NOT NULL
  • respondent_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • reward_ledger_entry_id — BIGINT — Foreign key → coin_ledger_entries.id
  • submitted_at — TIMESTAMPTZ — NOT NULL

surveys

  • id — BIGINT — Primary key — NOT NULL
  • booth_id — BIGINT — Foreign key → booths.id — NOT NULL
  • title — VARCHAR(200) — NOT NULL
  • description — TEXT
  • reward_coin — INTEGER — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • starts_at — TIMESTAMPTZ
  • ends_at — TIMESTAMPTZ
  • created_by_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

user_inventory_items

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • catalog_item_id — BIGINT — Foreign key → catalog_items.id — NOT NULL
  • quantity — INTEGER — NOT NULL
  • acquired_via — VARCHAR(30) — NOT NULL
  • acquired_at — TIMESTAMPTZ — NOT NULL

users

  • id — BIGINT — Primary key — NOT NULL
  • account_type — VARCHAR(20) — NOT NULL
  • nickname — VARCHAR(30) — NOT NULL
  • avatar_code — VARCHAR(3800)
  • status — VARCHAR(20) — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

wallets

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • balance — INTEGER — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL