1. ERD Cloud
2. DATABASE 구조
Region {
"region_id(pk)" : "Primary Key",
"region_name" : "지역"
}
User {
"user_id(pk)" : "Primary Key",
"bookmarks(fk)" : "ManyToMany",
"region_id(fk)" : "Foreign Key",
"username" : "사용자 아이디",
"password" : "비밀번호",
"fullname": "이름",
"email" : "이메일",
"phone" : "핸드폰 번호",
"birthday" : "생년월일",
"join_date" : "가입일자"
}
Option {
"option_id(pk)" : "Primary Key",
"option_name" : "공원 옵션 이름"
}
Park {
"park_id(pk)" : "Primary Key",
"option_id(fk)" : "ManyToMany",
"park_name" : "공원명",
"addr" : "공원주소",
"zone" : "지역",
"addr_dong" : "동",
"admintel" : "전화번호",
"main_equip" : "주요시설",
"template_url" : "바로가기",
"list_content" : "공원개요",
"image" : "이미지",
"longitude" : "X좌표(WGS84)",
"latitude" : "Y좌표(WGS84)",
"check_count" : "조회수",
"created_at" : "공원 정보 생성시간",
"updated_at" : "공원 정보 수정시간"
}
ParkOption {
"parkoption_id(pk)" : "Primary Key",
"park_id(fk)" : "Foreign Key",
"option_id(fk)" : "Foreign Key",
}
ParkComment {
"parkcomment_id(pk)" : "Primary Key",
"user_id(fk)" : "Foreign Key",
"park_id(fk)" : "Foreign Key",
"comment" : "댓글",
"created_at" : "작성 시간",
"updated_at" : "수정 시간"
}
BookMark {
"bookmark_id(pk)" : "Primary Key",
"user_id(fk)" : "Foreign Key",
"park_id(fk)" : "Foreign Key",
}
tag {
"tag_id(pk)" : "Primary Key",
"tag_name" : "태그"
}
Article {
"article_id(pk)" : "Primary Key",
"user_id(fk)" : "Foreign Key",
"tag_id(fk)" : "Foreign Key",
"park_id(fk)" : "Foreign Key"
"image" : "이미지",
"title" : "제목",
"content" : "내용",
"check_count" : "조회수",
"created_at" : "작성 시간",
"updated_at" : "수정 시간",
}
ArticleComment {
"articlecomment_id(pk)" : "Primary Key",
"user_id(fk)" : "Foreign Key",
"article_id(fk)" : "Foreign Key",
"comment" : "댓글",
"created_at" : "작성 시간",
"updated_at" : "수정 시간"
}