instagram
Tables (16)
Block
- blockId — BIGINT — Primary key — NOT NULL
- followerId — BIGINT — Foreign key → User.userId — NOT NULL — 차단을 하는 userId
- followingId — BIGINT — Foreign key → User.userId — NOT NULL — 차단을 당하는 userId
- blockStatus — VARCHAR(45) — NOT NULL — 차단숨김 여부, ACTIVE : 활성, HIDDEN : 숨김 처리, BLOCKED : 차단
- status — BIT — NOT NULL — 1 : 활성화. 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간
CloseFriend
- closeFriendId — BIGINT — Primary key — NOT NULL
- followerId — BIGINT — Foreign key → User.userId — NOT NULL — 친한 친구 하는 userId
- followingId — BIGINT — Foreign key → User.userId — NOT NULL — 친한 친구 당하는 userId
- friendStatus — BIT — NOT NULL — 친한 친구 설정 여부, 1 : 친한 친구 O, 0 : 친한 친구 X
- status — BIT — NOT NULL — 1 : 활성화. 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — 수정 시간
Comment
- commentId — BIGINT — Primary key — NOT NULL
- userId — BIGINT — Foreign key → User.userId — NOT NULL
- groupId — BIGINT — Foreign key → Comment.commentId — NOT NULL — 부모 commentId (댓글 = 자기자신, 대댓글, 부모의 commentId)
- comment — TEXT — NOT NULL — 댓글
- status — BIT — NOT NULL — 1 : 활성화, 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간
- postId (postId2) — BIGINT — Foreign key → Post.postId — NOT NULL — Auto Increament
CommentLike
- commentLikeId — BIGINT — Primary key — NOT NULL
- commentId — BIGINT — Foreign key → Comment.commentId — NOT NULL
- userId — BIGINT — Foreign key → User.userId — NOT NULL
- status — BIT — NOT NULL — 좋아요 추가/취소 여부. 1 : 추가, 0 : 취소
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간
ContentTag
- contentTagId — BIGINT — Primary key — NOT NULL
- postId — BIGINT — Foreign key → Post.postId — NOT NULL — Auto Increament
- tagWord — VARCHAR(45) — NOT NULL — 태그이름
- status — BIT — NOT NULL — 1 : 활성화, 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간
Highlight
- highLightId — BIGINT — Primary key — NOT NULL
- userHighLightId — BIGINT — Foreign key → UserHighlight.userHighlightId — NOT NULL
- userStoryId — BIGINT — Foreign key → UserStory.userStoryId — NOT NULL
- status — BIT — NOT NULL — 1 : 활성화, 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간
Post
- postId — BIGINT — Primary key — NOT NULL — Auto Increament
- userId (userId2) — BIGINT — Foreign key → User.userId — NOT NULL
- content — TEXT — 게시글 내용
- place — TEXT — 게시글 주소
- likeShowStatus — BIT — NOT NULL — 1 : 활성화, 0 : 비활성화
- commentShowStatus — BIT — NOT NULL — 1 : 활성화, 0 : 비활성화
- photoUrl1 — TEXT — NOT NULL — 게시물 사진
- photoUrl2 — TEXT
- photoUrl3 — TEXT
- photoUrl4 — TEXT
- photoUrl5 — TEXT
- photoUrl6 — TEXT
- photoUrl7 — TEXT
- photoUrl8 — TEXT
- photoUrl9 — TEXT
- photoUrl10 — TEXT
- status — BIT — NOT NULL — 1 : 활성화, 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간
PostUser
- postLikeId — BIGINT — Primary key — NOT NULL
- userId — BIGINT — Foreign key → User.userId — NOT NULL
- postId (postId2) — BIGINT — Foreign key → Post.postId — NOT NULL — Auto Increament
- postShowStatus — BIT — NOT NULL — 1 : 활성화, 0 : 비활성화
- status — BIT — NOT NULL — 1 : 활성화, 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간
- likeStatus — BIT — 1:활성화,0:비활성화
Scrap
- scrapId — BIGINT — Primary key — NOT NULL
- postId — BIGINT — NOT NULL
- userId — BIGINT — Foreign key → User.userId — NOT NULL
- status — BIT — NOT NULL — 1 : 활성화, 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간
StoryViewer
- storyViewerId — BIGINT — Primary key — NOT NULL
- userStoryId — BIGINT — Foreign key → UserStory.userStoryId — NOT NULL
- userId — BIGINT — Foreign key → User.userId — NOT NULL
- likeStatus — BIT — NOT NULL — 좋아요 여부, 1 : 좋아요 누름, 0 : 좋아요 안누름
- status — BIT — NOT NULL — 1 : 활성화, 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간
User
- userId — BIGINT — Primary key — NOT NULL
- phoneNumber — VARCHAR(45) — 중복 불가, phoneNumber나 emailAddress 중 하나 필수
- emailAddress — TEXT — 중복 불가, phoneNumber나 emailAddress 중 하나 필수
- birthDate — DATE — NOT NULL — 생년월일
- nickname — VARCHAR(30) — NOT NULL — 중복 불가, 영문자, 숫자, 마침표, 밑줄만 사용 가능
- password — TEXT — NOT NULL — 비밀번호, 6자리 이상
- profileImageUrl — TEXT — NOT NULL — 프로필 이미지
- name — TEXT — 이름
- introduce — TEXT — 소개
- gender — VARCHAR(45) — NOT NULL — 성별, FEMALE : 여, MALE : 남, UNDISCLOSED : 밝히지 않음, 직접입력
- accountStatus — VARCHAR(45) — NOT NULL — 계정 상태, ACTIVE : 활성화, INACTIVE : 비활성, DELETED : 삭제
- status — BIT — NOT NULL — 1 : 활성화. 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간
UserFollow
- followId — BIGINT — Primary key — NOT NULL
- followerId — BIGINT — Foreign key → User.userId — NOT NULL — 팔로우를 하는 주체 유저 아이디
- followingId — BIGINT — Foreign key → User.userId — NOT NULL — 유저가 팔로우 하는 아이디
- status — BIT — NOT NULL — 1 : 활성화. 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간
UserHighlight
- userHighlightId — BIGINT — Primary key — NOT NULL
- userId — BIGINT — Foreign key → User.userId — NOT NULL
- title — VARCHAR(15) — NOT NULL — 하이라이트 제목
- coverImgUrl — TEXT — NOT NULL — 하이라이트 커버 이미지
- status — BIT — NOT NULL — 1 : 활성화, 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간
UserLog
- userLogId — BIGINT — Primary key — NOT NULL
- userId — BIGINT — Foreign key → User.userId — NOT NULL
- userlog — VARCHAR(45) — NOT NULL — 아직 미완성
- status — BIT — NOT NULL — 1 : 활성화. 0 : 삭제
- createdAt — TIMESTAMP — 생성 시간
- updatedAt — TIMESTAMP — 수정 시간
UserStory
- userStoryId — BIGINT — Primary key — NOT NULL
- usertd — BIGINT — Foreign key → User.userId — NOT NULL
- storyUrl — TEXT — NOT NULL — 스토리 Url
- status — BIT — NOT NULL — 1 : 활성화, 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간
UserTag
- userTagId — BIGINT — Primary key — NOT NULL
- userId — BIGINT — Foreign key → User.userId — NOT NULL
- postId — BIGINT — Foreign key → Post.postId — NOT NULL — Auto Increament
- photoUrl — TEXT — NOT NULL — 사용자 태그 달린 사진 주소
- status — BIT — NOT NULL — 1 : 활성화, 0 : 삭제
- createdAt — TIMESTAMP — NOT NULL — 생성 시간
- updatedAt — TIMESTAMP — NOT NULL — 수정 시간