HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🧚
[1기]최종 프로젝트 데브코스
/
🏀
[팀14] 슬램 - 우리 주변 농구장 예약
/
🎯
ERD 설계
🎯

ERD 설계

 
base_entity
이름
타입
설명
속성
널 여부
created_at
datetime(6)
생성 날짜
PK
NOT NULL
updated_at
datetime(6)
수정 날짜
NOT NULL
user(사용자)
이름
타입
설명
속성
널 여부
비고
id
bigint
사용자 구별키
PK
NOT NULL
social_id
varchar(255)
SNS(카카오)에서의 사용자 식별키
UNIQUE
NOT NULL
nickname
varchar(30)
사용자 닉네임
NOT NULL
description
varchar(100)
사용자 자기 소개
email
varchar(50)
사용자 이메일
UNIQUE
NOT NULL
profile_image
varchar(255)
사용자 프로필 사진
role
varchar(255)
관리자(admin) / 일반 사용자(user)
NOT NULL
proficiency
varchar(255)
숙련도
position
varchar(30)
선호 농구 포지션
created_at
datetime(6)
생성 날짜
NOT NULL
updated_at
datetime(6)
수정 날짜
NOT NULL
user_positions
이름
타입
설명
속성
널 여부
비고
user_id
bigint
FK
NOT NULL
positions
int
follow(팔로우)
이름
타입
설명
속성
널 여부
비고
id
bigint
팔로우 구별키
PK
NOT NULL
follwer_id
bigint
팔로우 당한 사람
FK
NOT NULL
user_id
follwing_id
bigint
팔로우 한 사람
FK
NOT NULL
user_id
created_at
datetime(6)
생성 날짜
updated_at
datetime(6)
수정 날짜
 
court(등록된 농구장)
이름
타입
설명
속성
널 여부
비고
id
bigint
등록된 농구장 구별키
PK
NOT NULL
name
varchar(50)
등록된 농구장 이름
NOT NULL
latitude
double
등록된 농구장 위도
NOT NULL
longitude
double
등록된 농구장 경도
NOT NULL
image
varchar(255)
등록된 농구장 이미지
default 사진 저장 위치 논의중
basket_count
int
등록된 농구장 골대 수
NOT NULL
texture
varchar(255)
등록된 농구장 바닥재질
created_at
datetime(6)
생성 날짜
updated_at
datetime(6)
수정 날짜
new_court(새로 추가한 농구장)
이름
타입
설명
속성
널 여부
id
bigint
사용자가 추가한 농구장 구별키
PK
NOT NULL
name
varchar(50)
사용자가 추가한 농구장 이름
NOT NULL
latitude
double
사용자가 추가한 농구장 위도
NOT NULL
longitude
double
사용자가 추가한 농구장 경도
NOT NULL
image
varchar(255)
사용자가 추가한 농구장 이미지
basket_count
int
사용자가 추가한 농구 골대 수
NOT NULL
texture
varchar(255)
사용자가 추가한 농구장 바닥 재질
status
varchar(255)
사용자가 추가한 농구장 등록 여부 (관리자 판단) 종류: ready, accept, deny
NOT NULL
created_at
datetime(6)
생성 날짜
NOT NULL
updated_at
datetime(6)
수정 날짜
NOT NULL
reservation(예약)
이름
타입
설명
속성
널 여부
id
bigint
예약 구별키
PK
NOT NULL
user_id
bigint
예약한 사용자 구별키
FK
NOT NULL
court_id
bigint
예약된 농구장 구별키
FK
NOT NULL
start_time
datetime(6)
예약 시작시간
NOT NULL
end_time
datetime(6)
예약 종료시간
NOT NULL
has_ball
boolean
해당 예약의 농구공 여부
NOT NULL
created_at
datetime(6)
생성 날짜
updated_at
datetime(6)
수정 날짜
favorite(즐겨찾기 농구장)
이름
타입
설명
속성
널 여부
id
bigint
즐겨찾기 농구장 구별키
PK
NOT NULL
court_id
bigint
농구장 구별키
FK
NOT NULL
user_id
bigint
사용자 구별키
FK
NOT NULL
created_at
datetime(6)
생성 날짜
updated_at
datetime(6)
수정 날짜
chat_contents
이름
타입
설명
속성
널 여부
비고
id
bigint
채팅방 구별키
PK
NOT NULL
created_at
datetime(6)
생성 날짜
NOT NULL
updated_at
datetime(6)
수정 날짜
NOT NULL
chat_content_type
varchar(255)
채팅 내용 타입
LOUDSPEAKER, CONVERSATION
conversation_id
bigint
채팅 대화 내용 구별키
loudspeaker_id
bigint
확성기 채팅 내용 구별키
court_id
bigint
채팅하고 있는 경기장의 구별키
user_id
bigint
작성자 정보
chat_conversation_contents
이름
타입
설명
속성
널 여부
비고
id
bigint
채팅방의 내용 구별키
PK
NOT NULL
content
varchar(255)
채팅방의 내용 내용
NOT NULL
채팅 내용 길이 제한 논의 필요
created_at
datetime(6)
생성 날짜
NOT NULL
updated_at
datetime(6)
수정 날짜
NOT NULL
chat_loudspeaker_contents
이름
타입
설명
속성
널 여부
id
bigint
사용자와 농구장 매핑 구별키
PK
NOT NULL
start_time
int(11)
확성기 사용한 경기장의 경기 시작 시작 시간
FK
NOT NULL
created_at
datetime(6)
생성 날짜
NOT NULL
updated_at
datetime(6)
수정 날짜
NOT NULL
court_chatroom_mapping
이름
타입
설명
속성
널 여부
id
bigint
PK
NOT NULL
court_id
bigint
농구장 구별키
FK
follow_notification
이름
타입
설명
속성
널 여부
id
bigint
PK
NOT NULL
check_creator_id
bigint
팔로우한 사람 구별키
NOT NULL
user_id
bigint
팔로우 당한 사람 구별키
NOT NULL
creator_id
bigint
팔로우한 사람 구별키
FK
NOT NULL
loudspeaker_notification
이름
타입
설명
속성
널 여부
id
bigint
PK
NOT NULL
court_id
bigint
확성기 발생된 경기장 구별키
FK
NOT NULL
user_id
bigint
확성기를 발생시킨 사용자
start_time
int
경기 시작 시간
notification_index
이름
타입
설명
속성
널 여부
기타
id
bigint
PK
NOT NULL
user_id
bigint
공지를 받을 사용자 구별키
NOT NULL
follow_noti_id
bigint
팔로우 공지 내용 구별키
FK
loudspeaker_noti_id
bigint
확성기 공지 내용 구별키
FK
check_creator_id
bigint
공지 생성한 사용자의 구별키
notification_type
varchar(255)
공지 타입
FOLLOWING, LOUDSPEAKER;
is_clicked
boolean
공지 상세 내용 읽음 여부
is_read
boolean
공지 읽음 여부
created_at
datetime(6)
생성 날짜
updated_at
datetime(6)
수정 날짜