Storm_StockMarket
Tables (8)
DirectChat (direct_chat)
- direct_chat_id (PK) — BIGINT — Primary key — NOT NULL
- content (채팅 메시지) — TEXT — NOT NULL
- created_at (생성 일시) — DATETIME — NOT NULL
- game_id (PK2) — BIGINT — Foreign key → Game.game_id — NOT NULL
- sender_participant_id (FK) — BIGINT — Foreign key → GameParticipation.participant_id — NOT NULL
Game (game)
- game_id (PK) — BIGINT — Primary key — NOT NULL
- game_status (게임 상태) — BOOLEAN — NOT NULL — True: 실행 중
- current_cycle (현재 사이클) — BIGINT
- created_at (생성 일자) — DATETIME — NOT NULL
GameParticipation (game_participitation)
- participant_id (PK) — BIGINT — Primary key — NOT NULL
- nickname (닉네임) — VARCHAR(50) — NOT NULL
- participant_status (참여 여부) — BIGINT — NOT NULL — 0: 게임 중, 1: 게임 종료, 2: 게임 도중 퇴장
- left_at (떠난 시간) — DATETIME — NOT NULL
- created_at (생성 시간) — DATETIME — NOT NULL
- user_id (FK) — BIGINT — Foreign key → User.user_id
- game_id (FK2) — BIGINT — Foreign key → Game.game_id — NOT NULL
GameResult (게임 결과)
- result_id (PK) — BIGINT — Primary key — NOT NULL
- rank (순위) — BIGINT — NOT NULL
- final_cash (최종 자산) — NUMBER — NOT NULL
- participant_id — BIGINT — Foreign key → GameParticipation.participant_id — NOT NULL
GlobalChat (global_chat)
- group_chat_id (PK) — BIGINT — Primary key — NOT NULL
- current_cycle (FK3) — BIGINT — NOT NULL
- content (채팅 메시지) — TEXT — NOT NULL
- created_at (생성 일시) — DATETIME — NOT NULL
- game_id (FK) — BIGINT — Foreign key → Game.game_id — NOT NULL
- sender_participant_id (FK2) — BIGINT — Foreign key → GameParticipation.participant_id
Stock (stock)
- stock_id (PK) — BIGINT — Primary key — NOT NULL
- stock_name (주식명) — VARCHAR(50) — NOT NULL
StockTransaction (stock_transactions)
- transacktion_id (PK) — Primary key — NOT NULL
- game_id (FK) — BIGINT — Foreign key → Game.game_id — NOT NULL
- participant_id (FK2) — BIGINT — Foreign key → GameParticipation.participant_id — NOT NULL
- stock_id (주식 번호) — BIGINT — NOT NULL
- quantity (수량) — BIGINT — NOT NULL
- price (가격) — BIGINT — NOT NULL
- cycle_number (사이클 번호(FK)) — BIGINT — NOT NULL — Game 테이블의 current_cycle 참조
- created_at (거래 시간) — DATETIME — NOT NULL
User (회원)
- user_id — BIGINT — Primary key — NOT NULL
- email (이메일) — VARCHAR(255) — NOT NULL — UNIQUE
- password (비밀번호) — VARCHAR(255) — NOT NULL
- nickname (닉네임) — VARCHAR(50) — NOT NULL
- profile_image (프로필이미지) — VARCHAR(500)
- status (상태) — BIGINT — NOT NULL — 0: 가입, 1: 탈퇴
- created_at (생성 일자) — DATETIME — NOT NULL