TEAM11 with Foreign key

Tables (8)

auth_info_tb (자체가입 유저)

  • id (Key) — INT — Primary key — NOT NULL
  • user_id (Key2) — INT — Foreign key → user_tb.id — NOT NULL
  • email (Field2) — VARCHAR(255)
  • password (Field3) — VARCHAR(255)
  • updated_date (Field4) — DATE
  • created_date (Field5) — DATE

auth_social_login_tb (소셜로그인 유저)

  • id (Key) — INT — Primary key — NOT NULL
  • user_id (Key2) — int — Foreign key → user_tb.id — NOT NULL
  • oauth_code (Field2) — VARCHAR(255)
  • token (Field3) — VARCHAR(255)

category_tb (카테고리)

  • id (Key) — INT — Primary key — NOT NULL
  • category_name (Field1) — INT

decision_tb (투표자)

  • id (Key) — INT — Primary key — NOT NULL
  • user_id (Field) — INT
  • option_id (Field2) — INT
  • user_id (Key2) — INT — Foreign key → user_tb.id — NOT NULL
  • option_id (Key3) — INT — Foreign key → option_tb.id — NOT NULL

option_tb (선택지)

  • id (Key) — INT — Primary key — NOT NULL
  • option_name (Field2) — VARCHAR(255)
  • option_count (Field3) — BIGINT
  • vote_id (Key2) — int — Foreign key → vote_tb.id — NOT NULL

user_tb (유저)

  • id (Key) — INT — Primary key — NOT NULL
  • user_nickname (Field) — VARCHAR(255)
  • login_type (Field2) — ENUM

vote_comment_tb (댓글)

  • id (Key) — INT — Primary key — NOT NULL
  • user_id (Key2) — int — Foreign key → user_tb.id — NOT NULL
  • vote_id (Key3) — int — Foreign key → vote_tb.id — NOT NULL
  • comment_content (Field1) — VARCHAR(255)
  • created_date (Field2) — DATE
  • updated_date (Field3) — DATE

vote_tb (투표)

  • id (Key) — INT — Primary key — NOT NULL
  • category_id (Key2) — INT — Foreign key → category_tb.id — NOT NULL
  • user_id (Key3) — int — Foreign key → user_tb.id — NOT NULL
  • vote_title (Field2) — VARCHAR(255)
  • vote_content (Field3) — VARCHAR(255)
  • vote_end_date (Field4) — DATE
  • created_date (Field5) — DATE
  • vote_status (Field6) — ENUM
  • vote_type (Field7) — ENUM