tripy
테이블 (12)
게시글 (Story)
- 게시글Id (stroyId) — int unsigned auto_increment — 기본 키 — NOT NULL
- ID (userId) — int unsigned auto_increment — 외래 키 → 이용자.ID — NOT NULL
- 제목 (title) — VARCHAR(30)
- 대표이미지 (image) — VARCHAR(40) — NOT NULL
- 본문 (content) — VARCHAR(1000)
- 좋아요수 (liked) — BIGINT — NOT NULL
- 작성일 (createdDate) — timestamp DEFAULT current_timestamp — NOT NULL
- 수정일 (updatedDate) — timestamp DEFAULT current_timestamp — NOT NULL
게시글사진 (storyImage)
- 사진아이디 (imageId) — int unsigned auto_increment — 기본 키 — NOT NULL
- 게시글Id (stroyId) — int unsigned auto_increment — 외래 키 → 게시글.게시글Id — NOT NULL
- 파일이름 (fileName) — VARCHAR(40) — NOT NULL
- 생성일 (createdDate) — timestamp DEFAULT current_timestamp
- 수정일 (updateDate) — timestamp DEFAULT current_timestamp
국적과지역 (userNation)
- 국적ID (nationId) — VARCHAR(20) — 기본 키 — NOT NULL
- ID (userId) — VARCHAR(20) — 외래 키 → 이용자.ID — NOT NULL
- 국적과지역 (userNation) — VARCHAR(30)
- 생성일 (createdDate) — timestamp DEFAULT current_timestamp — NOT NULL
- 수정일 (updatedDate) — timestamp DEFAULT current_timestamp
댓글 (comment)
- 댓글ID (commentId) — int unsigned auto_increment — 기본 키 — NOT NULL
- 게시글Id (stroyId) — VARCHAR(40) — 외래 키 → 게시글.게시글Id — NOT NULL
- 작성자ID (userId) — VARCHAR(20) — 외래 키 → 이용자.ID — NOT NULL
- 본문 (content) — VARCHAR(1000) — NOT NULL
- 생성일 (createdDate) — timestamp DEFAULT current_timestamp — NOT NULL
- 수정일 (updatedDate) — timestamp DEFAULT current_timestamp
리뷰 (review)
- 리뷰아이디 (riviewId) — int unsigned auto_increment — 기본 키 — NOT NULL
- ID (userId) — VARCHAR(20) — 외래 키 → 이용자.ID — NOT NULL
- 여행지Id (destinationId) — int unsigned auto_increment — 외래 키 → 여행지.여행지Id — NOT NULL
- 내용 (text) — VARCHAR(100) — NOT NULL
- 별점 (liked) — int — NOT NULL
- 생성일 (createdDate) — timestamp DEFAULT current_timestamp — NOT NULL
- 수정일 (updateDate) — timestamp DEFAULT current_timestamp
여행지 (destination)
- 여행지Id (destinationId) — int unsigned auto_increment — 기본 키 — NOT NULL
- 카테고리Id (categoryId) — int unsigned auto_increment — 외래 키 → 카테고리.카테고리Id — NOT NULL
- 여행지 (destinationName) — VARCHAR(50) — NOT NULL
- 대표이미지 (image) — VARCHAR(300) — NOT NULL
- 생성일 (createdDate) — timestamp DEFAULT current_timestamp
- 수정일 (updatedDate) — timestamp DEFAULT current_timestamp
- 별점개수 (star) — int — NOT NULL
- 좋아요 (liked) — BIGINT — NOT NULL
이용자 (userTable)
- ID (userId) — VARCHAR(20) — 기본 키 — NOT NULL
- 이메일 (userEmail) — varchar(25) — NOT NULL
- 비밀번호 (userPw) — varchar(50) — NOT NULL
- 닉네임 (userNick) — varchar(20) — NOT NULL
- 연령 (userAge) — varchar(20)
- 가입일자 (userCreated) — timestamp DEFAULT current_timestamp — NOT NULL
- 수정일자 (userMod) — timestamp DEFAULT current_timestamp
- 삭제 여부 (userDeleted) — BOOLEAN — NOT NULL
- 서비스이용약관동의여부 (serviceAgree) — BOOLEAN — NOT NULL
인기여행지 (popular destinations)
- 인기여행지Id (popdestination) — int unsigned auto_increment — 기본 키 — NOT NULL
- 여행지Id (destinationId) — int unsigned auto_increment — 외래 키 → 여행지.여행지Id — NOT NULL
- 생성일 (createdDate) — DATETIME — NOT NULL
- 수정일 (updatedDate) — DATETIME
좋아요 (liked)
- 좋아요ID (likedId) — int unsigned auto_increment — 기본 키 — NOT NULL
- 게시글Id (stroyId) — int unsigned auto_increment — 외래 키 → 게시글.게시글Id — NOT NULL
- 좋아요 여부 (check) — VARCHAR(10) — NOT NULL
카테고리 (Category)
- 카테고리Id (categoryId) — int unsigned auto_increment — 기본 키 — NOT NULL
- 카테고리이름 (catergoryName) — VARCHAR(40)
- 생성일 (createdDate) — timestamp DEFAULT current_timestamp — NOT NULL
- 수정일 (updatedDate) — timestamp DEFAULT current_timestamp
- Field
태그 (tag)
- 태그아이디 (tagId) — int unsigned auto_increment — 기본 키 — NOT NULL
- 사진아이디 (imageId) — int unsigned auto_increment — 외래 키 → 게시글사진.사진아이디 — NOT NULL
- 게시글Id (stroyId) — int unsigned auto_increment — 외래 키 → 게시글사진.게시글Id — NOT NULL
- 여행지Id (destinationId) — int unsigned auto_increment — 외래 키 → 여행지.여행지Id — NOT NULL
프로필 사진 (userProfile)
- 프로필ID (profileId) — VARCHAR(20) — 기본 키 — NOT NULL
- ID (userId) — VARCHAR(20) — 외래 키 → 이용자.ID — NOT NULL
- 사진URL (profileUrl) — VARCHAR(300) — NOT NULL — NOTNULL
- 생성일 (createdDate) — timestamp DEFAULT current_timestamp
- 수정일 (modifiedDate) — timestamp DEFAULT current_timestamp