way2

Tables (23)

alarm_settings

  • alarm_setting_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • alarm_setting_new_question — TINYINT
  • alarm_setting_reply — TINYINT
  • alarm_setting_comment — TINYINT
  • alarm_setting_answer — TINYINT
  • alarm_setting_board_comment — TINYINT

alarms

  • alarm_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • alarm_message — VARCHAR(255) — NOT NULL
  • alarm_url — VARCHAR(255)
  • created_at — TIMESTAMP — NOT NULL

board_post_comments

  • board_post_comment_id — BIGINT — Primary key — NOT NULL
  • board_post_id — BIGINT — Foreign key → board_posts.board_post_id — NOT NULL
  • board_post_comment_content — VARCHAR(255) — NOT NULL
  • board_post_comment_created_at — TIMESTAMP
  • board_post_comment_pre_comment_id — BIGINT
  • board_post_comment_user_id — BIGINT — Foreign key → users.user_id

board_post_likes

  • board_post_like_id — BIGINT — Primary key — NOT NULL
  • board_post_id — BIGINT — Foreign key → board_posts.board_post_id — NOT NULL
  • board_post_like_user_id — BIGINT — Foreign key → users.user_id — NOT NULL

board_post_scraps

  • board_post_scrap_id — BIGINT — Primary key — NOT NULL
  • board_post_id — BIGINT — Foreign key → board_posts.board_post_id — NOT NULL
  • board_post_scrap_user_id — BIGINT — Foreign key → users.user_id — NOT NULL

board_posts

  • board_post_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id
  • board_id — BIGINT — Foreign key → boards.board_id — NOT NULL
  • board_post_title — VARCHAR(255) — NOT NULL
  • board_post_content — VARCHAR(1000) — NOT NULL
  • board_post_created_at — TIMESTAMP — NOT NULL
  • board_post_anonymous_permission — BOOLEAN — NOT NULL

boards

  • board_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id
  • board_name — VARCHAR(255) — NOT NULL
  • board_introduction — TEXT
  • board_anonymous_permission — BOOLEAN — NOT NULL

chats

  • chat_id — BIGINT — Primary key — NOT NULL
  • answerer_id — BIGINT — Foreign key → users.user_id
  • questioner_id — BIGINT — Foreign key → users.user_id
  • question_id — BIGINT — Foreign key → questions.question_id — NOT NULL
  • chat_nickname_open — INT — NOT NULL — 닉네임 공개 여부 및 요청 여부
  • chat_answerer_active — TINYINT — NOT NULL
  • chat_questioner_active — TINYINT — NOT NULL
  • chat_name — VARCHAR(255) — NOT NULL
  • chat_created_at — TIMESTAMP
  • CHECK — (chat_nickname_open IN (0, 1, 2))

follows

  • follow_id — BIGINT — Primary key — NOT NULL
  • follower_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • following_id — BIGINT — Foreign key → users.user_id — NOT NULL

interests

  • interest_id — BIGINT — Primary key — NOT NULL
  • interest_name — VARCHAR(50) — NOT NULL

likes

  • likes_id — BIGINT — Primary key — NOT NULL
  • question_id — BIGINT — Foreign key → questions.question_id
  • user_id — BIGINT — Foreign key → users.user_id
  • post_id — BIGINT — Foreign key → posts.post_id

post_box

  • post_box_id — BIGINT — Primary key — NOT NULL
  • post_id — BIGINT — Foreign key → posts.post_id — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL

post_comment

  • post_comment_id — BIGINT — Primary key — NOT NULL
  • post_id — BIGINT — Foreign key → posts.post_id — NOT NULL
  • post_comment_content — VARCHAR(255) — NOT NULL
  • post_comment_created_at — TIMESTAMP
  • post_comment_pre_comment_id — BIGINT
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL

posts

  • post_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id
  • post_title — VARCHAR(255) — NOT NULL
  • post_content — TEXT — NOT NULL
  • post_created_at — TIMESTAMP
  • post_delete_status — TINYINT
  • post_image_url — VARCHAR(255)
  • post_pin_status — TINYINT
  • post_like — INT

question_box

  • question_box_id — BIGINT — Primary key — NOT NULL
  • question_id — BIGINT — Foreign key → questions.question_id — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL

questions

  • question_id — BIGINT — Primary key — NOT NULL
  • questioner_id — BIGINT — Foreign key → users.user_id — 익명일때는 null값이 들어가야함
  • answerer_id — BIGINT — Foreign key → users.user_id — 답변하지않았을땐 null값
  • question — VARCHAR(500) — NOT NULL
  • answer — VARCHAR(500)
  • question_date — TIMESTAMP — NOT NULL
  • answer_date — TIMESTAMP — 답변했을때 해당날짜로 update
  • question_delete_YN — TINYINT
  • question_image_url — VARCHAR(255)
  • question_pin_status — TINYINT
  • question_status — TINYINT — 답변완료되면 1 나중에 select 할때 1인 값들로만 가져오면됨
  • question_rejected — TINYINT
  • question_like — INT
  • user_ip — VARCHAR(500)
  • is_anonymous — TINYINT

refresh_token

  • token_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • token_value — VARCHAR(255) — NOT NULL

reports

  • Key — BIGINT — Primary key — NOT NULL
  • report_reporter — BIGINT — Foreign key → users.user_id — NOT NULL
  • report_reported — BIGINT — Foreign key → users.user_id — NOT NULL
  • report_type — VARCHAR(255)
  • report_content_id — BIGINT
  • report_content — TEXT
  • report_created_at — TIMESTAMP
  • report_status — BOOLEAN

roles

  • role_id — BIGINT — Primary key — NOT NULL
  • role_name — VARCHAR(50) — NOT NULL

social_login

  • social_login_id — BIGINT — Primary key — NOT NULL
  • social_provider — VARCHAR(255) — NOT NULL
  • social_id — VARCHAR(255)
  • social_created_at — TIMESTAMP
  • uuid — VARCHAR(255) — NOT NULL

user_interest

  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • interest_id — BIGINT — Foreign key → interests.interest_id — NOT NULL

user_role

  • role_id — BIGINT — Foreign key → roles.role_id — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL

users

  • user_id — BIGINT — Primary key — NOT NULL
  • username — VARCHAR(50)
  • nickname — VARCHAR(50)
  • provider — VARCHAR(255) — NOT NULL
  • created_at — TIMESTAMP
  • user_image — VARCHAR(255)