CodeFlip

Tables (7)

card_tag

  • card_id — BIGINT — Primary key — NOT NULL
  • tag_id — BIGINT — Primary key — NOT NULL

cards

  • card_id — BIGINT — Primary key
  • user_id (creator_id) — BIGINT — Foreign key → users.user_id
  • question_text — TEXT — NOT NULL
  • answer_code — TEXT — NOT NULL
  • language — VARCHAR(30) — NOT NULL
  • category — VARCHAR(50)
  • is_public — BOOLEAN
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

daily_study_log

  • log_id — BIGINT — Primary key
  • user_id — BIGINT — NOT NULL
  • date — DATE — NOT NULL
  • reviewed_count — INT — NOT NULL
  • created_at — TIMESTAMP

submissions

  • submission_id — BIGINT — Primary key
  • user_id — BIGINT — NOT NULL
  • card_id — BIGINT — NOT NULL
  • submitted_code — MEDIUMTEXT — NOT NULL
  • result — ENUM('PASS', 'FAIL') — NOT NULL
  • submitted_at — TIMESTAMP

tags

  • tag_id — BIGINT — Primary key
  • tag_name — VARCHAR(50) — NOT NULL
  • description — VARCHAR(255)
  • created_at — TIMESTAMP

user_card_progress

  • progress_id — BIGINT — Primary key
  • user_id — BIGINT — NOT NULL
  • card_id — BIGINT — NOT NULL
  • memory_level — TINYINT — NOT NULL
  • last_reviewed_at — TIMESTAMP
  • next_review_at — TIMESTAMP
  • review_count — INT — NOT NULL

users

  • user_id — BIGINT — Primary key
  • email — VARCHAR(255) — NOT NULL
  • password_hash — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP