11package com .cabin .plat .domain .track .dto ;
22
3+ import io .swagger .v3 .oas .annotations .media .Schema ;
34import java .time .LocalDateTime ;
45import java .util .List ;
56import lombok .*;
67
7- public class TrackResponse {
8+ public class TrackResponse {
89
910 @ Getter
1011 @ Builder
1112 @ AllArgsConstructor
1213 @ NoArgsConstructor
1314 public static class TrackMapList {
15+ @ Schema (description = "트랙 리스트" )
1416 private List <TrackMap > tracks ;
1517 }
1618
@@ -19,6 +21,7 @@ public static class TrackMapList {
1921 @ AllArgsConstructor
2022 @ NoArgsConstructor
2123 public static class TrackDetailList {
24+ @ Schema (description = "트랙 디테일 리스트" )
2225 private List <TrackDetail > trackDetails ;
2326 }
2427
@@ -28,10 +31,19 @@ public static class TrackDetailList {
2831 @ NoArgsConstructor
2932 @ EqualsAndHashCode
3033 public static class TrackMap {
34+ @ Schema (description = "트랙 고유 ID" , example = "1" )
3135 private Long trackId ;
36+
37+ @ Schema (description = "트랙 ISRC 코드" , example = "isrc2" )
3238 private String isrc ;
39+
40+ @ Schema (description = "트랙의 위도" , example = "36.015733" )
3341 private Double latitude ;
42+
43+ @ Schema (description = "트랙의 경도" , example = "129.322700" )
3444 private Double longitude ;
45+
46+ @ Schema (description = "좋아요 여부" , example = "false" )
3547 private Boolean isLiked ;
3648 }
3749
@@ -40,17 +52,40 @@ public static class TrackMap {
4052 @ AllArgsConstructor
4153 @ NoArgsConstructor
4254 public static class TrackDetail {
55+ @ Schema (description = "트랙 고유 ID" , example = "1" )
4356 private Long trackId ;
57+
58+ @ Schema (description = "트랙 ISRC 코드" , example = "BRBMG0300729" )
4459 private String isrc ;
60+
61+ @ Schema (description = "트랙 생성일" , example = "2024-09-07T17:40:43.049879" )
4562 private LocalDateTime createdAt ;
63+
64+ @ Schema (description = "트랙의 위도" , example = "36.014188" )
4665 private Double latitude ;
66+
67+ @ Schema (description = "트랙의 경도" , example = "129.325802" )
4768 private Double longitude ;
69+
70+ @ Schema (description = "건물 이름" , example = "포항공대제1융합관" )
4871 private String buildingName ;
72+
73+ @ Schema (description = "주소" , example = "경상북도 포항시 남구 지곡동" )
4974 private String address ;
75+
76+ @ Schema (description = "트랙 이미지 URL" , example = "https://example.com/track.png" )
5077 private String imageUrl ;
78+
79+ @ Schema (description = "트랙 내용" , example = "트랙 게시물 본문입니다." )
5180 private String content ;
81+
82+ @ Schema (description = "좋아요 수" , example = "12" )
5283 private int likeCount ;
84+
85+ @ Schema (description = "좋아요 여부" , example = "false" )
5386 private Boolean isLiked ;
87+
88+ @ Schema (description = "작성자 정보" )
5489 private MemberInfo member ;
5590 }
5691
@@ -59,8 +94,13 @@ public static class TrackDetail {
5994 @ AllArgsConstructor
6095 @ NoArgsConstructor
6196 public static class MemberInfo {
97+ @ Schema (description = "회원 고유 ID" , example = "1" )
6298 private Long memberId ;
99+
100+ @ Schema (description = "회원 닉네임" , example = "plat" )
63101 private String memberNickname ;
102+
103+ @ Schema (description = "회원 아바타 이미지 URL" , example = "https://example.com/avatar.png" )
64104 private String avatar ;
65105 }
66106
@@ -69,6 +109,7 @@ public static class MemberInfo {
69109 @ AllArgsConstructor
70110 @ NoArgsConstructor
71111 public static class TrackId {
112+ @ Schema (description = "트랙 고유 ID" , example = "1" )
72113 private Long trackId ;
73114 }
74115
@@ -77,6 +118,7 @@ public static class TrackId {
77118 @ AllArgsConstructor
78119 @ NoArgsConstructor
79120 public static class ReportId {
121+ @ Schema (description = "리포트 고유 ID" , example = "100" )
80122 private Long reportId ;
81123 }
82124}
0 commit comments