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

[GET] /api/v1/chat/room/court?params

✅
채팅 타이틀(목록) 조회하기

REQUEST

Header

Headers { Authorization: "Bearer {token}" }
RequestParameter
Filed
Type
Description
비고
size
Number
요청한 데이터의 개수
lastId
Number
데이터의 마지막 인덱스 값
isFirst
Boolean
첫번째 페이지인지 아닌지
 
  • court | user | all

RESPONSE

Body
Filed
Type
Description
비고
data.contents.[].courtName
String
농구장 이름
data.contents.[].courtId
Number
사용자의 채팅방 목록에서의 채팅방 구별키
data.contents.[].createdAt
String
사용자의 채팅방 생성 시각
날짜 포맷: YYYY-mm-DDThh:MM:ss
data.contents.[].updatedAt
String
채팅방 내용의 수정 시각
날짜 포맷: YYYY-mm-DDThh:MM:ss
data.contents.lastId
Number
데이터의 마지막 인덱스 값
 
  • Body 예시
{ "contents": [ { "id": 1, "court": { "id":1, "name":"잠실한강공원농구장", "latitude":127.082348760182, "longitude":37.5177740347208, "image":"https://team14-slam.s3.ap-northeast-2.amazonaws.com/court_dummy/court1.jpg", "basketCount":2, "texture":"ASPHALT" }, "lastChat": { "text": "마지막 메시지입니다" | "2021-01-01T12:20:10.000Z" "user": { "id": 1, } "createdAt": "2021-01-01T12:20:10.000Z", "updatedAt": "2021-01-01T12:20:10.000Z", } "createdAt": "2021-01-01T12:20:10.000Z", "updatedAt": "2021-01-01T12:20:10.000Z", }, { "courtName": "합정 농구장" "courtId": 2, "createdAt": "2021-01-01T12:20:10.000Z", "updatedAt": "2021-01-01T12:20:10.000Z" }, ], "lastId": 10 }
 
 
interface ChatRoom { id: number, type: "COURT" | "USERS" court?: Court, role?: { admin: User[], participant: User[], }, personLimit?: 100, lastChat: Chat, createdAt: "ISOstring", updatedAt: "ISOstring", } interface Chat { id: number, text: string, emoticons: { "😎": User[], "🤔": User[], }, loudSpeaker?: LoudSpeaker, text: string, creator: User, createdAt: "ISOstring", updatedAt: "ISOstring", } interface LoudSpeaker { id: number, startTime : string, createdAt: "ISOstring", updatedAt: "ISOstring", }
 
 
몽고 db 고려해볼 것