spring-rest-api - jayden.kim(김지형)
테이블 (12)
게시글 (articles)
- 게시글ID (article_id) — bigint — 기본 키 — NOT NULL — increment
- 유저ID (user_id) — bigint — 외래 키 → 사용자.유저ID — NOT NULL — 게시글 작성자
- 제목 (title) — varchar(26) — NOT NULL
- 본문 (content) — mediumtext — NOT NULL
- 본문 사진 (content_images) — json
- 생성 일자 (created_at) — timestamp — NOT NULL
- 수정 일자 (updated_at) — timestamp
- 삭제 일자 (deleted_at) — timestamp
- 숨김 여부 (is_article_hidden) — tinyint(1) — NOT NULL
게시글 데이터 (article_stats)
- 게시글ID (article_id) — bigint — 외래 키 → 게시글.게시글ID — NOT NULL
- 댓글 갯수 (comment_count) — bigint — NOT NULL
- 좋아요수 (article_like_count) — bigint — NOT NULL
- 조회수 (article_view_count) — bigint — NOT NULL
- 신고수 (article_report_count) — bigint — NOT NULL
게시글 변경 이력 (article_update_history)
- 게시글 변경 이력 ID (article_history_id) — bigint — 기본 키 — NOT NULL — increment
- 게시글ID (article_id) — bigint — 외래 키 → 게시글.게시글ID — NOT NULL
- 이전 제목 (title) — varchar(26) — NOT NULL
- 이전 본문 (content) — mediumtext — NOT NULL
- 이전 본문 사진 (content_images) — json
- 생성 일자 (created_at) — timestamp — NOT NULL
게시글 신고 (article_reports)
- 신고ID (report_id) — bigint — 기본 키 — NOT NULL — increment
- 게시글ID (article_id) — bigint — 외래 키 → 게시글.게시글ID — NOT NULL
- 유저ID (user_id) — bigint — 외래 키 → 사용자.유저ID — NOT NULL — 신고자
- 유형 (report_type) — varchar(100) — NOT NULL — spam, violence, etc
- 신고 사유 (reason) — varchar(500) — NOT NULL
- 생성 일자 (created_at) — timestamp — NOT NULL
- 상황 (status) — varchar(20) — NOT NULL — waiting, rejected, copleted
댓글 (comments)
- 댓글ID (comment_id) — bigint — 기본 키 — NOT NULL — increment
- 게시글ID (article_id) — bigint — 외래 키 → 게시글.게시글ID — NOT NULL
- 유저ID (user_id) — bigint — 외래 키 → 사용자.유저ID — NOT NULL — 댓글 작성자
- 부모 댓글ID (parent_comment_id) — bigint
- 댓글 내용 (comment_text) — text — NOT NULL
- 생성 일자 (created_at) — timestamp — NOT NULL
- 수정 일자 (updated_at) — timestamp
- 삭제 일자 (deleted_at) — timestamp
사용자 (users)
- 유저ID (user_id) — bigint — 기본 키 — NOT NULL — increment
- 이메일 (email) — varchar(255) — NOT NULL
- 패스워드 (password) — varchar(255) — NOT NULL
- 닉네임 (nickname) — varchar(10) — NOT NULL
- 프로필 사진 (profile_image) — varchar(2048)
- 생성 일자 (created_at) — timestamp — NOT NULL
- 삭제 일자 (deleted_at) — timestamp
- 정보 수정 일자 (information_updated_at) — timestamp
- 패스워드 수정 일자 (password_updated_at) — timestamp
임시저장 게시글 (temp_articles)
- 유저ID (user_id) — bigint — 외래 키 → 사용자.유저ID — NOT NULL
- 제목 (title) — varchar(26)
- 본문 (content) — mediumtext — NOT NULL
- 본문 사진 (content_images) — json
- 저장 일자 (saved_at) — timestamp — NOT NULL
조회 (article_views)
- 조회 ID (article_view_id) — bigint — 기본 키 — NOT NULL — increment
- 게시글ID (article_id) — bigint — 외래 키 → 게시글.게시글ID — NOT NULL
- 유저ID (user_id) — bigint — 외래 키 → 사용자.유저ID — NOT NULL
- 수정 일자 (updated_at) — timestamp — NOT NULL
좋아요 (article_likes)
- 좋아요ID (article_like_id) — bigint — 기본 키 — NOT NULL
- 게시글ID (article_id) — bigint — 외래 키 → 게시글.게시글ID — NOT NULL
- 유저ID (user_id) — bigint — 외래 키 → 사용자.유저ID — NOT NULL
- 생성 일자 (created_at) — timestamp — NOT NULL
채팅메시지 (chat_messages)
- 메시지ID (chat_message_id) — bigint — 기본 키 — NOT NULL
- 전송자ID (sender_id) — bigint — 외래 키 → 사용자.유저ID — NOT NULL — increment
- 채팅방ID (chat_room_id) — bigint — 외래 키 → 채팅방.채팅방ID — NOT NULL
- 내용 (content) — text — NOT NULL
- 타입 (chat_type) — varchar(20) — NOT NULL
- 생성일자 (created_at) — timestamp — NOT NULL
- 수정일자 (updated_at) — timestamp
- 삭제일자 (deleted_at) — timestamp
채팅멤버 (chat_room_members)
- 채팅방멤버ID (chat_room_member_id) — bigint — 기본 키 — NOT NULL
- 채팅방ID (chat_room_id) — bigint — 외래 키 → 채팅방.채팅방ID — NOT NULL
- 유저ID (user_id) — bigint — 외래 키 → 사용자.유저ID — NOT NULL
- 마지막 읽은 메시지 ID (last_read_message_id) — bigint — 외래 키 → 채팅메시지.메시지ID — NOT NULL
채팅방 (chat_rooms)
- 채팅방ID (chat_room_id) — bigint — 기본 키 — NOT NULL
- 생성일자 (created_at) — timestamp — NOT NULL