HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🧚
[1기]최종 프로젝트 데브코스
/
🏀
[팀14] 슬램 - 우리 주변 농구장 예약
/
🧭
Domain 설계
/
[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 예시
{ "contents": [ { "id": "10", //string으로 변경 "startTime": "2021-01-01T03:00:00.000Z", "endTime": "2021-01-01T05:00:00.000Z", "hasBall": false, "userId": "2", //string으로 변경 "profileImage": "https://s4...", }, { "id": "11", //string으로 변경 "startTime": "2021-01-01T03:00:00.000Z", "endTime": "2021-01-01T05:00:00.000Z", "hasBall": true, "userId": "2", //string으로 변경 "profileImage": "https://s4...", } ] }
 
 

예약 API 점검

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