DevTalk
Tables (6)
category (게시글 카테고리)
- id (게시글 카테고리 ID) — int — Primary key — NOT NULL — auto_increment
- name (카테고리 이름) — varchar(50) — NOT NULL
- created_at (생성일) — timestamp — NOT NULL — current_timestamp
comment (댓글)
- id (댓글ID) — bigint — Primary key — NOT NULL — auto_increment
- post_id (게시글ID) — bigint — Foreign key → post.id — NOT NULL
- author_id (작성자ID) — bigint — Foreign key → user_account.id — NOT NULL
- content (내용) — text — NOT NULL
- is_deleted (삭제 여부) — tinyint(1) — NOT NULL
- is_anonymous (익명 여부) — tinyint(1) — NOT NULL
- created_at (작성일) — timestamp — NOT NULL
- updated_at (수정일) — timestamp — NOT NULL
- deleted_at (삭제일) — timestamp
post (게시글)
- id (게시글ID) — bigint — Primary key — NOT NULL — auto_increment
- author_id (작성자ID) — bigint — Foreign key → user_account.id — NOT NULL
- category_id (게시글 카테고리 ID) — int — Foreign key → category.id — NOT NULL
- title (제목) — varchar(26) — NOT NULL
- content (본문) — longtext — NOT NULL
- view_count (조회수) — int — NOT NULL
- comemnt_count (댓글수) — int — NOT NULL
- upvote_count (추천수) — int — NOT NULL
- downvote_count (비추천수) — int — NOT NULL
- is_deleted (삭제 여부) — tinyint(1) — NOT NULL
- is_anonymous (익명 여부) — tinyint(1) — NOT NULL
- created_at (작성일) — timestamp — NOT NULL
- updated_at (수정일) — timestamp — NOT NULL
- deleted_at (삭제일) — timestamp
post_image (게시글 이미지)
- id (게시글 이미지ID) — bigint — Primary key — NOT NULL — auto_increment
- post_id (게시글ID) — bigint — Foreign key → post.id — NOT NULL
- original_file_name (원본 파일 이름) — varchar(255) — NOT NULL
- stored_file_name (저장 파일 이름) — varchar(255) — NOT NULL
- size (파일 크기) — bigint — NOT NULL
- content_type (파일 타입) — varchar(100) — NOT NULL
- is_deleted (삭제 여부) — boolean — NOT NULL
- created_at (생성일) — timestamp — NOT NULL
post_vote (게시글 리액션)
- id (게시글 투표 ID) — bigint — Primary key — NOT NULL — auto_increment
- voter_id (사용자ID) — bigint — Foreign key → user_account.id — NOT NULL
- post_id (게시글ID) — bigint — Foreign key → post.id — NOT NULL
- vote_type (투표 타입) — varchar(20) — NOT NULL — UPVOTE, DOWNVOTE
- created_at (생성일) — timestamp — NOT NULL
user_account (사용자)
- id (사용자ID) — bigint — Primary key — NOT NULL — auto_increment
- email (이메일) — varchar(255) — NOT NULL — unique, index
- password (비밀번호) — varchar(100) — NOT NULL
- nickname (닉네임) — char(10) — NOT NULL — unique, index
- profile_image_url (프로필 이미지 경로) — varchar(255)
- is_deleted (탈퇴 여부) — tinyint(1) — NOT NULL
- created_at (가입일) — timestamp — NOT NULL
- updated_at (수정일) — timestamp — NOT NULL
- deleted_at (삭제일) — timestamp