HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🧚
[1기]최종 프로젝트 데브코스
/
🏀
[팀14] 슬램 - 우리 주변 농구장 예약
/
🧭
Domain 설계 1
/
[GET] /api/v1/courts/{courtId}/reservations/{date}

[GET] /api/v1/courts/{courtId}/reservations/{date}

✅
농구장 특정 날짜의 예약 전체조회

Request

Headers

headers { Authorization: "Bearer ${token}" }

RESPONSE

Body
Field
Type
Description
비고
courtId
Number
농구장 아이디
date
Number
농구장 특정 날짜
reservations.[].reservationsId
String
Number
예약 아이디
reservations.[].userId
Number
예약 유저 아이디
reservations.[].avatarImgSrc
Number
String
예약된 유저의 이미지
reservations.[].courtId
String
예약 코트 아이디
YYYY-mm-DDThh:MM:ss
reservations.[].startTime
String
수정 시간
YYYY-mm-DDThh:MM:ss
reservations[].endTime
String
종료 시간
reservations[].hasBall
Boolean
농구장
  • Body 예시
{ "courtId": 7, "date": "2021-12-31", "reservations": [ { "reservationId": 10, "userId": 2, "avatarImgSrc": "https://s4...", "courtId": 7, "startTime": "2021-01-01T12:00:00", "endTime": "2021-01-01T14:00:00", "hasBall": "false" }, { "reservationId": 13, "userId": 3, "avatarImgSrc": "https://s4...", "courtId": 7, "startTime": "2021-01-01T12:00:00", "endTime": "2021-01-01T15:00:00", "hasBall": "true" }, { "reservationId": 17, "userId": 4, "avatarImgSrc": "https://s4...", "courtId": 7, "startTime": "2021-01-01T12:00:00", "endTime": "2021-01-01T15:00:00", "hasBall": "false" }, { "reservationId": 21, "userId": 5, "avatarImgSrc": "https://s4...", "courtId": 7, "startTime": "2021-01-01T12:00:00", "endTime": "2021-01-01T14:00:00", "hasBall": "false" }, { "reservationId": 24, "userId": 6, "avatarImgSrc": "https://s4...", "courtId": 7, "startTime": "2021-01-01T12:00:00", "endTime": "2021-01-01T14:00:00", "hasBall": "false" }, { "reservationId": 27, "userId": 6, "avatarImgSrc": "https://s4...", "courtId": 7, "startTime": "2021-01-01T12:00:00", "endTime": "2021-01-01T15:00:00", "hasBall": "false" }, ] }
 
 

예약 API 점검

  • request: 농구장 아이디와 날짜를 통해
    • courtID
    • 날짜
  • response : 하루의 전체 예약현황을 받아오는 API가 필요합니다.
  • 정렬 기준
    • 전체: 0시~24시까지 시간 순으로 정렬
    • 30분 블록, 한 블록: 예약의 updatedAt을 기준으로 정렬