QUIZY

Tables (5)

QuizLog (quiz_log)

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • userId (user_id) — BIGINT — Foreign key → user.id — NOT NULL
  • className (class_name) — VARCHAR(50) — NOT NULL
  • major — VARCHAR(50) — NOT NULL
  • topic — VARCHAR(100) — NOT NULL
  • score — TINYINT
  • difficulty — VARCHAR(20) — NOT NULL
  • correctAnswer (correct_answer) — TINYINT — NOT NULL
  • choose — TINYINT
  • questionText (question_text) — TEXT — NOT NULL
  • option1 (option_1) — VARCHAR(255) — NOT NULL
  • option2 (option_2) — VARCHAR(255) — NOT NULL
  • option3 (option_3) — VARCHAR(255) — NOT NULL
  • option4 (option_4) — VARCHAR(255) — NOT NULL
  • solution — TEXT — NOT NULL
  • createdAt (created_at) — TIMESTAMP — NOT NULL

RefreshToken (refresh_token)

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • userId (user_id) — BIGINT — Foreign key → user.id — NOT NULL
  • refreshToken (refresh_token) — VARCHAR(255) — NOT NULL
  • expiredAt (expired_at) — TIMESTAMP — NOT NULL
  • deletedAt (deleted_at) — TIMESTAMP — 로그아웃시 시간 기재

npc

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • name — VARCHAR(50) — NOT NULL
  • major — VARCHAR(50) — NOT NULL

topic

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • npcId (npc_id) — BIGINT — Foreign key → npc.id — NOT NULL
  • name — VARCHAR(100) — NOT NULL

user (users)

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • email — VARCHAR(50) — NOT NULL — UNIQUE
  • password — VARCHAR(255) — NOT NULL
  • role — VARCHAR(20) — NOT NULL
  • major — VARCHAR(50) — NOT NULL
  • name — VARCHAR(50) — NOT NULL — UNIQUE
  • totalScore (total_score) — BIGINT — NOT NULL — DEFAULT 0
  • createdAt (created_at) — TIMESTAMP — NOT NULL