compick

Tables (26)

board

  • board_id — BIGINT — Primary key — NOT NULL
  • user_idx — BIGINT — NOT NULL
  • content — TEXT
  • parent_id — BIGINT
  • category_idx — VARCHAR(255)
  • title — VARCHAR(255) — NOT NULL
  • views — INT — NOT NULL
  • created_at — DATETIME — NOT NULL

board (게시글)

    board_like (좋아요)

      board_match (게시글 경기 태그)

        chat_message

        • message_id — BIGINT — Primary key — NOT NULL
        • match_id — BIGINT — NOT NULL
        • user_idx — BIGINT — NOT NULL
        • content — VARCHAR(2000) — NOT NULL
        • created_at — DATETIME — NOT NULL

        comment

        • comment_id — bigint(20) — Primary key — NOT NULL
        • board_id — bigint(20) — Foreign key → board.board_id — NOT NULL
        • user_idx — bigint(20) — Foreign key → user.user_idx — NOT NULL
        • parent_id — bigint(20) — Foreign key → comment.comment_id
        • content — text — NOT NULL
        • created_at — datetime — NOT NULL
        • updated_at — datetime
        • del_check — tinyint(1) — NOT NULL
        • user_idx — bigint(20) — NOT NULL
        • del_check — tinyint(1) — NOT NULL
        • liked_at — datetime — NOT NULL
        • board_id — BIGINT — NOT NULL
        • file_url — VARCHAR(255)
        • file_name — VARCHAR(255)
        • file_type — VARCHAR(30) — NOT NULL
        • uploaded_at — DATETIME

        league

        • league_id — BIGINT — Primary key — NOT NULL
        • league_name — VARCHAR(100) — NOT NULL
        • league_nickname — VARCHAR(255)
        • image_url — VARCHAR(500) — NOT NULL
        • sport_id — BIGINT — NOT NULL

        league (리그)

        • id — BIGINT — Primary key — NOT NULL
        • 리그명 (league_name) — VARCHAR(100) — NOT NULL
        • 리그이미지 (image_url) — VARCHAR(500) — NOT NULL

        match_score (경기점수)

        • match_id — BIGINT — Foreign key → matches.id — NOT NULL
        • team_id — BIGINT — Foreign key → team_info.team_id — NOT NULL
        • 점수 (score) — INT — NOT NULL

        match_score

        • match_id — BIGINT — Primary key — NOT NULL
        • team_id — BIGINT — Primary key — NOT NULL
        • score — INT — NOT NULL

        match_status

        • code — INT — Primary key — NOT NULL
        • description — VARCHAR(50)
        • type — VARCHAR(30)

        match_vote (경기투표)

          matches

          • match_id — BIGINT — Primary key — NOT NULL
          • league_id — BIGINT — NOT NULL
          • home_team_id — BIGINT — NOT NULL
          • away_team_id — BIGINT — NOT NULL
          • start_time — DATETIME — NOT NULL
          • status_code — INT

          matches (경기일정)

          • id — BIGINT — Primary key — NOT NULL
          • 리그 (league_id) — BIGINT — Foreign key → league.id — NOT NULL
          • 홈팀 (home_team_id) — BIGINT — Foreign key → team_info.team_id — NOT NULL
          • AWAY_TEAM (away_team_id) — BIGINT — Foreign key → team_info.team_id — NOT NULL
          • 경기시작시간 (start_time) — DATETIME — NOT NULL

          matchtag

          • matchtag_id — BIGINT — Primary key — NOT NULL
          • board_id — BIGINT — NOT NULL
          • match_id — BIGINT — NOT NULL

          media (미디어)

            refresh_tokens

            • id — BIGINT — Primary key — NOT NULL
            • user_id — BIGINT — NOT NULL
            • jti — VARCHAR(36) — NOT NULL
            • token_hash — VARCHAR(255) — NOT NULL
            • issued_at — DATETIME — NOT NULL
            • expires_at — DATETIME — NOT NULL
            • revoked — TINYINT — NOT NULL

            sport

            • sport_id — BIGINT — Primary key — NOT NULL
            • sport_code — VARCHAR(50) — NOT NULL
            • sport_name — VARCHAR(100) — NOT NULL

            team_info

            • team_id — BIGINT — Primary key — NOT NULL
            • team_name — VARCHAR(255) — NOT NULL
            • image_url — VARCHAR(500) — NOT NULL

            team_info (구단정보)

            • team_id — BIGINT — Primary key — NOT NULL
            • 구단명 (team_name) — VARCHAR(255) — NOT NULL
            • 구단이미지 (image_url) — VARCHAR(500) — NOT NULL

            user

            • user_idx — BIGINT — Primary key — NOT NULL
            • user_nickname — VARCHAR(30)
            • introduction — VARCHAR(500)
            • email — VARCHAR(100)
            • password — VARCHAR(255)
            • user_id — VARCHAR(255)
            • bio — VARCHAR(255)
            • profile_image — LONGTEXT
            • del_check — TINYINT — NOT NULL
            • del_user_idx — BIGINT
            • created_at — DATETIME — NOT NULL
            • deleted_at — DATETIME

            user (사용자)

              user_oauth

              • provider — VARCHAR(20) — Primary key — NOT NULL
              • provider_user_id — VARCHAR(180) — Primary key — NOT NULL
              • user_id — BIGINT — NOT NULL

              user_saved_match (유저가 저장한 경기)

                verification_codes

                • id — BIGINT — Primary key — NOT NULL
                • user_id — BIGINT
                • channel — ENUM('email','phone') — NOT NULL
                • destination — VARCHAR(255) — NOT NULL
                • purpose — ENUM('signup','login','reset','change') — NOT NULL
                • code_hash — VARCHAR(255) — NOT NULL
                • expires_at — DATETIME — NOT NULL
                • consumed_at — DATETIME

                vote_type (투표유형)