clonegramERD
테이블 (8)
게시글 (post)
- 포스트ID (post_id) — NOT NULL, Auto_increment — 기본 키 — NOT NULL
- 사용자ID (user_id) — NOT NULL, Auto_increment — 외래 키 → 사용자.사용자ID — NOT NULL
- 내용 (caption) — NULL
- 이미지 주소 (image_url) — NULL
- 생성일 (created_at) — NULL, DEFAULT current_timestamp()
댓글 (comment)
- 상품ID (comment_id) — NOT NULL, Auto_increment — 기본 키 — NOT NULL
- 사용자ID (user_id) — NOT NULL, Auto_increment — 외래 키 → 사용자.사용자ID — NOT NULL
- 포스트ID (post_id) — NOT NULL, Auto_increment — 외래 키 → 게시글.포스트ID — NOT NULL
- 내용 (content) — NULL
- 생성일 (created_at) — NULL, DEFAULT current_timestamp()
릴스 (video_posts)
- 릴스ID (id) — NOT NULL, Auto_increment — 기본 키 — NOT NULL
- 사용자ID (user_id) — NOT NULL, Auto_increment — 외래 키 → 사용자.사용자ID — NOT NULL
- 비디오경로 (video_path) — NULL
- 내용 (caption) — NULL
- 생성일 (created_at) — NULL, DEFAULT current_timestamp()
메세지 (message)
- 메세지ID (messge_id) — NOT NULL, Auto_increment — 기본 키 — NOT NULL
- 받는사람 (receiver_id) — NOT NULL — 외래 키 → 사용자.사용자ID — NOT NULL
- 보내는사람 (sender_id) — NOT NULL — 외래 키 → 사용자.사용자ID — NOT NULL
- 내용 (content) — NOT NULL
- 보낸시간 (sent_at) — NULL, DEFAULT current_timestamp()
사용자 (user)
- 사용자ID (user_id) — NOT NULL, Auto_increment — 기본 키 — NOT NULL
- 아이디 (username) — NOT NULL
- 이메일 (email) — NOT NULL
- 비밀번호 (password) — NOT NULL
- 이름 (full_name) — NULL
- 소개 (bio) — NULL
- 프로필이미지 (profile_image_url) — NOT NULL
- 생성일 (created_at) — NULL, DEFAULT current_timestamp()
- 수정일 (updated_time) — NULL, DEFAULT current_timestamp(), UPDATE current_timestamp()
- 등급 (grade) — NOT NULL, DEFAULT 'Bronze'
- Field
알림 (notifications)
- 알림ID (notifications_id) — NOT NULL, Auto_increment — 기본 키 — NOT NULL
- 사용자ID (user_id) — NOT NULL, Auto_increment — 외래 키 → 사용자.사용자ID — NOT NULL
- 내용 (message) — NOT NULL
- 생성일 (created_at) — NULL, DEFAULT current_timestamp()
- 확인시간 (read_at) — NULL
- 메시지종류 (type) — NULL
- 타입아이디 (tid) — NULL
좋아요 (likey)
- 좋아요ID (like_id) — NOT NULL, Auto_increment — 기본 키 — NOT NULL
- 포스트ID (post_id) — NOT NULL, Auto_increment — 외래 키 → 게시글.포스트ID — NOT NULL
- 사용자ID (user_id) — NOT NULL, Auto_increment — 외래 키 → 사용자.사용자ID — NOT NULL
- 생성일 (created_at) — NULL, DEFAULT current_timestamp()
팔로우 (follow)
- ID (id) — NOT NULL, Auto_increment — 기본 키 — NOT NULL
- 팔로잉ID (user_id) — NOT NULL, Auto_increment — 외래 키 → 사용자.사용자ID — NOT NULL
- 팔로워ID (follower_id) — NOT NULL, Auto_increment — 외래 키 → 사용자.사용자ID — NOT NULL