Instagram-clone

Tables (31)

alarms (알람)

  • alarm_id (알람 순번) — bigint — Primary key — NOT NULL
  • target_id (타겟 회원 순번) — bigint — Foreign key → 회원.member_id
  • post_id (게시물 순번) — bigint — Foreign key → posts.post_id — NOT NULL
  • comment_id (댓글 순번) — bigint — Foreign key → comments.comment_id — NOT NULL
  • follow_id (팔로우 순번) — bigint — Foreign key → follows.follow_id — NOT NULL
  • alarm_create_date (알람일) — timestamp
  • member_id (회원 순번2) — bigint — Foreign key → follows.member_id

blocks (차단)

  • block_id (차단 순번) — bigint — Primary key — NOT NULL
  • member_id (회원 순번) — bigint — Foreign key → 회원.member_id
  • member_id (회원 순번2) — bigint — Foreign key → 회원.member_id

bookmarks (게시물 저장)

  • bookmakr_id (게시물 저장 순번) — bigint — Primary key — NOT NULL
  • post_id (게시물 순번) — bigint — Foreign key → posts.post_id — NOT NULL

comment_likes (댓글 좋아요)

  • comment_like_id (댓글 좋아요 순번) — bigint — Primary key — NOT NULL
  • comment_id (댓글 순번) — bigint — Foreign key → comments.comment_id — NOT NULL

comments (댓글)

  • comment_id (댓글 순번) — bigint — Primary key — NOT NULL
  • post_id (게시물 순번) — bigint — Foreign key → posts.post_id — NOT NULL
  • parent_id (부모 댓글 순번) — bigint — Foreign key → comments.comment_id — NOT NULL
  • comment_content (댓글 내용) — varchar
  • comment_upload_date (댓글 업로드일) — datetime

follows (팔로우)

  • follow_id (팔로우 순번) — bigint — Primary key — NOT NULL
  • member_id (회원 순번) — bigint — Foreign key → 회원.member_id
  • member_id (회원 순번2) — bigint — Foreign key → 회원.member_id

hashtag_follows (팔로우(해시태그))

  • follow_id (팔로우 순번) — bigint — Foreign key → follows.follow_id — NOT NULL
  • member_id (회원 순번2) — bigint — Foreign key → follows.member_id
  • hashtag_id (해시태그 순번) — bigint — Foreign key → hashtags.hashtag_id — NOT NULL

hashtag_posts (해시태그(게시물))

  • hashtag_post_id (해시태그 (게시물) 순번) — bigint — Primary key — NOT NULL
  • post_id (게시물 순번) — bigint — Foreign key → posts.post_id — NOT NULL
  • hashtag_id (해시태그 순번) — bigint — Foreign key → hashtags.hashtag_id — NOT NULL

hashtags (해시태그)

  • hashtag_id (해시태그 순번) — bigint — Primary key — NOT NULL
  • hashtag_name (해시태그 이름) — varchar
  • hashtag_count (해시태그 개수) — bigint

join_rooms (참여 채팅방)

  • join_room_id (참여 채팅방 순번) — bigint — Primary key — NOT NULL
  • room_id (채팅방 순번) — bigint — Foreign key → rooms.room_id — NOT NULL
  • message_id (메시지 순번) — bigint — Foreign key → messages.message_id — NOT NULL
  • join_room_create_date (채팅방 참여일) — bigint

mentions (멘션)

  • mention_id (멘션 순번) — bigint — Primary key — NOT NULL
  • target_id (타겟 회원순번) — bigint — Foreign key → 회원.member_id
  • post_id (게시물 순번) — bigint — Foreign key → posts.post_id — NOT NULL
  • comment_id (댓글 순번) — bigint — Foreign key → comments.comment_id — NOT NULL
  • mention_create_date (멘션일) — timestamp
  • mention_type (멘션 type) — varchar

message_images (메시지(이미지))

  • message_id (메시지 순번) — bigint — Foreign key → messages.message_id — NOT NULL
  • message_image_url (메시지 이미지 url) — bigint
  • message_image_type (메시지 이미지 type) — bigint
  • message_image_name (메시지 이미지 name) — bigint
  • message_image_uuid (메시지 이미지 uuid) — bigint

message_likes (메시지 좋아요)

  • message_like_id (메시지 좋아요 순번) — bigint — Primary key — NOT NULL
  • message_id (메시지 순번) — bigint — Foreign key → messages.message_id — NOT NULL

message_posts (메시지(게시물))

  • message_id (메시지 순번) — bigint — Foreign key → messages.message_id — NOT NULL
  • post_id (게시물 순번) — bigint — Foreign key → posts.post_id — NOT NULL

message_stories (메시지(스토리))

  • message_id (메시지 순번) — bigint — Foreign key → messages.message_id — NOT NULL
  • story_visitor_id (스토리 방문자 순번) — bigint — Foreign key → story_visitors.story_visitor_id — NOT NULL

message_texts (메시지(텍스트))

  • message_id (메시지 순번) — bigint — Foreign key → messages.message_id — NOT NULL
  • message_text_content (메시지 텍스트 내용) — bigint

messages (메시지)

  • message_id (메시지 순번) — bigint — Primary key — NOT NULL
  • room_id (채팅방 순번) — bigint — Foreign key → rooms.room_id — NOT NULL
  • message_create_date (메시지 생성일) — bigint
  • dtype (메시지 타입) — bigint

post_images (게시물 이미지)

  • post_image_id (게시물 이미지 순번) — bigint — Primary key — NOT NULL
  • post_id (게시물 순번) — bigint — Foreign key → posts.post_id — NOT NULL
  • post_image_url (게시물 이미지 url) — bigint
  • post_image_type (게시물 이미지 type) — bigint
  • post_image_name (게시물 이미지 name) — bigint
  • post_image_uuid (게시물 이미지 uuid) — bigint
  • post_image_alt_text (게시물 이미지 대체 텍스트) — bigint

post_likes (게시물 좋아요)

  • post_like_id (게시물 좋아요 순번) — bigint — Primary key — NOT NULL
  • post_id (게시물 순번) — bigint — Foreign key → posts.post_id — NOT NULL

post_tags (게시물 태그)

  • post_tag_id (게시물 태그 순번) — bigint — Primary key — NOT NULL
  • post_image_id (게시물 이미지 순번) — bigint — Foreign key → post_images.post_image_id — NOT NULL
  • post_tag_y (게시물 태그 좌표 y) — int
  • post_tag_x (게시물 태그 좌표 x) — int
  • post_tag_username (게시물 태그 username) — varchar

posts (게시물)

  • post_id (게시물 순번) — bigint — Primary key — NOT NULL
  • post_content (게시물 내용) — bigint
  • post_upload_date (게시물 업로드일) — bigint
  • post_comment_flag (게시물 댓글 기능 여부) — bigint

recent_comments (게시물 최신 댓글)

  • recent_comment_id (게시물 최신 댓글 순번) — bigint — Primary key — NOT NULL
  • post_id (게시물 순번) — bigint — Foreign key → posts.post_id — NOT NULL
  • comment_id (댓글 순번2) — bigint — Foreign key → comments.comment_id — NOT NULL

room_members (채팅방 참여자)

  • room_member_id (채팅방 참여자 순번) — bigint — Primary key — NOT NULL
  • room_id (채팅방 순번) — bigint — Foreign key → rooms.room_id — NOT NULL

room_unread_members

  • room_unread_member_id (채팅방 메시지 읽지 않은 회원 순번) — bigint — Primary key — NOT NULL
  • room_id (채팅방 순번) — bigint — Foreign key → rooms.room_id — NOT NULL
  • message_id (메시지 순번) — bigint — Foreign key → messages.message_id — NOT NULL

rooms (채팅방)

  • room_id (채팅방 순번) — bigint — Primary key — NOT NULL

search_hashtag (검색(해시태그))

  • search_id (검색 순번) — bigint — Foreign key → searches.search_id — NOT NULL
  • hashtag_id (해시태그 순번) — bigint — Foreign key → hashtags.hashtag_id — NOT NULL

search_members (검색(회원))

  • search_id (검색 순번) — bigint — Foreign key → searches.search_id — NOT NULL

searches (검색)

  • search_id (검색 순번) — bigint — Primary key — NOT NULL
  • search_count (검색 횟수) — bigint
  • dtype (검색 타입) — varchar

stories (스토리)

  • story_id (스토리 순번) — bigint — Primary key — NOT NULL
  • story_image_url (스토리 이미지 url) — varchar
  • story_image_type (스토리 이미지 type) — varchar
  • story_image_name (스토리 이미지 name) — varchar
  • story_image_uuid (스토리 이미지 uuid) — varchar
  • story_upload_date (스토리 업로드일) — timestamp

story_visitors (스토리 방문자)

  • story_visitor_id (스토리 방문자 순번) — bigint — Primary key — NOT NULL
  • story_id (스토리 순번) — bigint — Foreign key → stories.story_id — NOT NULL

회원 (members)

  • member_id (회원 순번) — bigint — Primary key
  • member_username (회원 아이디) — varchar
  • member_role (회원 권한) — varchar
  • member_password (회원 비밀번호) — varchar
  • member_name (회원 이름) — varchar
  • member_website (회원 웹사이트) — varchar
  • member_introduce (회원 소개) — varchar
  • member_phone (회원 연락처) — varchar
  • member_gender (회원 성별) — varchar
  • member_image_url (회원 이미지 url) — varchar
  • member_image_type (회원 이미지 type) — varchar
  • member_image_name (회원 이미지 name) — varchar
  • member_image_uuid (회원 이미지 uuid) — varchar