board erd
Tables (5)
comments
- comment_id — bigint — Primary key
- comment — varchar(255) — archar(255
- created_at — datetime
- last_modified_at — datetime
- removed_at — datetime
- content_id — bigint — Foreign key → contents.content_id — NOT NULL — 게시물 id
- user_id — bigint — Foreign key → users.user_id — NOT NULL — 사용자id
contents
- content_id — bigint — Primary key — NOT NULL — 게시물 id
- category — varchar(255) — NOT NULL — 카테고리 분류(개, 고양이)
- 제목 (title) — varchar(255) — NOT NULL — 제목
- 내용 (content) — varchar(255) — NOT NULL — 내용
- 조회수 (view_count) — bigint — NOT NULL — 조회수
- 생성된 시간 (created_at) — datetime — 생성 일자
- 수정된 시간 (last_modified_at) — datetime — 수정 일자
- 삭제된 시간 (removed_at) — datetime — 삭제 일자
- user_id — bigint — Foreign key → users.user_id — NOT NULL — 사용자id
scraps
- scrap_id — bigint — Primary key — scrap_id
- scrap_type — varchar(255)
- created_at — datetime
- last_modified_at — datetime
- content_id — bigint — Foreign key → contents.content_id — NOT NULL — 게시물 id
- user_id — bigint — Foreign key → users.user_id — NOT NULL — 사용자id
user_roles
- user_id — bigint — Primary key — NOT NULL — userID
- roles — varchar(255) — NOT NULL — admin과 user 구분
- user_id (user_id2) — bigint — Foreign key → users.user_id — NOT NULL — 사용자id
users
- user_id — bigint — Primary key — NOT NULL — 사용자id
- nickname — varchar(255) — NOT NULL — 이름
- password — varchar(255) — NOT NULL — 비밀번호
- email — varchar(255) — NOT NULL — email
- created_at — datetime — 가입 일자
- last_modified_at — datetime — 수정 일자
- removed_at — datetime — 탈퇴 일자