HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🧚
[1기]최종 프로젝트 데브코스
/
🏀
[팀14] 슬램 - 우리 주변 농구장 예약
/
🎯
ERD (version 1 마감, 프론트와 백앤드 함께 조정한 내용)
🎯

ERD (version 1 마감, 프론트와 백앤드 함께 조정한 내용)

 
user(사용자)
이름
변수명
타입
설명
속성
널 여부
비고
id
userId
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
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
profile_image
varchar(255)
사용자 프로필 사진
user_positions
이름
변수명
타입
설명
속성
널 여부
비고
user_id
bigint
FK
NOT NULL
positions
int
follow(팔로우)
이름
변수명
타입
설명
속성
널 여부
비고
id
followId
bigint
팔로우 구별키
PK
NOT NULL
follwer_id
creatorId
bigint
팔로우 당한 사람
FK
NOT NULL
user_id
following_id
receiverId
bigint
팔로우 한 사람
FK
NOT NULL
user_id
created_at
datetime(6)
생성 날짜
updated_at
datetime(6)
수정 날짜
 
court(등록된 농구장)
이름
변수명
타입
설명
속성
널 여부
비고
id
courtId
bigint
등록된 농구장 구별키
PK
NOT NULL
name
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
사용자가 추가한 농구장 구별키
FK
new_court(새로 추가한 농구장)
이름
변수명
타입
설명
속성
널 여부
id
newCourtId
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
proposer_id
bigint
새 농구장을 추가한 유저의 구별키
FK
NOT NULL
supervisor_id
bigint
정식 농구장으로 승인한 관리자의 구별키
FK
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
이름
변수명
타입
설명
속성
널 여부
비고
id
bigint
채팅방 구별키
PK
NOT NULL
chat_type
varchar(255)
채팅 내용 타입
LOUDSPEAKER, DEFAULT
text
string
채팅 대화 내용
“” | “content”
loudspeaker_id
bigint
확성기 채팅 내용 구별키
FK
user_id
bigint
작성자 정보
FK
created_at
datetime(6)
생성 날짜
NOT NULL
updated_at
datetime(6)
수정 날짜
NOT NULL
 
chatroom
이름
변수명
타입
설명
속성
널 여부
비고
id
bigint
PK
NOT NULL
court_id
bigint
농구장 구별키
FK
participants
Array
참여자들 정보 user[]
보류
NOT NULL
admins
Array
관리자인 사용자 아이디 userId[]
보류
type
string
채팅 타입
NOT NULL
COURT|USERS|GROUP
chat_id
bigint
마지막 채팅
FK
createdAt
updatedAt
 
loudspeaker
이름
변수명
타입
설명
속성
널 여부
id
bigint
PK
NOT NULL
user_id
bigint
확성기를 발생시킨 사용자
FK
start_time
datetime(6)
경기 시작 시간
end_time
datetime(6)
경기끝 시간
createdAt
datetime(6)
updatedAt
datetime(6)
court_id(수정됨)
bigint
확성기가 눌러진 경기장
FK
 
notification
이름
변수명
타입
설명
속성
널 여부
기타
id
bigint
PK
NOT NULL
user_id
bigint
공지를 받을 사용자 구별키
NOT NULL
follow_id
bigint
팔로우 내용 구별키
FK
loudspeaker_id
bigint
확성기 내용 구별키
FK
type
varchar(255)
공지 타입
FOLLOWING, LOUDSPEAKER;
is_clicked
boolean
공지 상세 내용 읽음 여부
is_read
boolean
공지 읽음 여부
created_at
datetime(6)
생성 날짜
updated_at
datetime(6)
수정 날짜
 
chat_room_participants
이름
변수명
타입
설명
속성
널 여부
id
bigint
PK
NOT NULL
chat_room_Id
bigint
채팅방
FK
user_Id
int
채팅방에 참여한 사용자
FK
createdAt
datetime(6)
updatedAt
datetime(6)
 
chat_room_admins
이름
변수명
타입
설명
속성
널 여부
id
bigint
PK
NOT NULL
chat_room_Id
bigint
채팅방
FK
user_Id
int
채팅방에 참여한 사용자
type
string
권한
createdAt
datetime(6)
updatedAt
datetime(6)
 
 
 
 
 
 
 

Convention

response: