Mogwi

Tables (7)

cards

  • id — BIGINT(20) — Primary key — NOT NULL
  • problem_id — BIGINT(20) — NOT NULL
  • question — TEXT — NOT NULL
  • correct — TEXT — NOT NULL
  • image_url — VARCHAR(2048)
  • created_at — DATETIME
  • updated_at — DATETIME
  • INDEX — `problem_id`

categories

  • id — BIGINT(20) — Primary key — NOT NULL
  • tag_name — VARCHAR(50) — NOT NULL
  • color_code — VARCHAR(7)

problem_categories

  • id — BIGINT(20) — Primary key — NOT NULL
  • problem_id — BIGINT(20) — NOT NULL
  • category_id — BIGINT(20) — NOT NULL
  • INDEX — `problem_id`
  • INDEX — `category_id`

problems

  • id — BIGINT(20) — Primary key — NOT NULL
  • title — VARCHAR(30) — NOT NULL
  • author_id — BIGINT(20) — NOT NULL
  • description — VARCHAR(255)
  • is_public — INT(11) — NOT NULL
  • card_count — INT(11) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • INDEX — `author_id`

user_card_status

  • id — BIGINT(20) — Primary key — NOT NULL
  • user_id — BIGINT(20) — NOT NULL
  • problem_id — BIGINT(20) — NOT NULL
  • card_id — BIGINT(20) — NOT NULL
  • card_status — ENUM('new','forgotten','perfect','vague')
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • INDEX — `FK_user_card_status_cards`
  • INDEX — `FK_user_card_status_problems`

user_problem_status

  • id — BIGINT(20) — Primary key — NOT NULL
  • user_id — BIGINT(20) — NOT NULL
  • problem_id — BIGINT(20) — NOT NULL
  • is_liked — TINYINT(1)
  • is_scrapped — TINYINT(1)
  • problem_status — ENUM('new','ongoing','completed','') — NOT NULL
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • INDEX — `FK_user_problem_status_problems`
  • INDEX — `FK_user_problem_status_users`

users

  • id — BIGINT(20) — Primary key — NOT NULL
  • userid — VARCHAR(20) — NOT NULL
  • userpass — VARCHAR(255) — NOT NULL
  • usermail — VARCHAR(50) — NOT NULL
  • username — VARCHAR(50) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL