File tree Expand file tree Collapse file tree
src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .artists .dto .request ;
22
33import com .back .web7_9_codecrete_be .domain .artists .entity .ArtistType ;
4+ import io .swagger .v3 .oas .annotations .media .Schema ;
45import jakarta .validation .constraints .NotBlank ;
56import jakarta .validation .constraints .NotNull ;
67import jakarta .validation .constraints .Size ;
78
89public record CreateRequest (
910 @ NotBlank (message = "아티스트 이름은 필수로 입력해야합니다." )
1011 @ Size (max = 200 , message = "아티스트 이름은 200자를 넘길 수 없습니다." )
12+ @ Schema (description = "아티스트 이름입니다." )
1113 String artistName ,
1214
1315 @ Size (max = 150 , message = "아티스트 그룹 이름은 150자를 넘길 수 없습니다." )
16+ @ Schema (description = "아티스트 소속 그룹입니다. 아티스트 이름이 그룹인 경우, null 로 처리됩니다." )
1417 String artistGroup ,
1518
1619 @ NotNull (message = "아티스트 타입은 필수로 입력해야합니다(SOLO or GROUP)" )
20+ @ Schema (description = "아티스트 타입입니다." , example = "SOLO or GROUP" )
1721 ArtistType artistType ,
1822
1923 @ NotBlank (message = "장르는 필수로 입력해야합니다." )
2024 @ Size (max = 30 , message = "장르는 30자를 넘길 수 없습니다." )
25+ @ Schema (description = "장르 이름입니다." )
2126 String genreName
2227) {
2328}
Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .artists .dto .request ;
22
3+ import io .swagger .v3 .oas .annotations .media .Schema ;
34import jakarta .validation .constraints .NotBlank ;
45import jakarta .validation .constraints .Size ;
56
67public record SearchRequest (
78 @ NotBlank (message = "검색어를 입력해주세요" )
89 @ Size (max = 200 , message = "아티스트 이름은 200자를 넘길 수 없습니다." )
10+ @ Schema (description = "아티스트 이름입니다." )
911 String artistName
1012) {
1113}
Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .artists .dto .request ;
22
33import com .back .web7_9_codecrete_be .domain .artists .entity .ArtistType ;
4+ import io .swagger .v3 .oas .annotations .media .Schema ;
45import jakarta .validation .constraints .Size ;
56
67public record UpdateRequest (
78 @ Size (max = 200 , message = "아티스트 이름은 200자를 넘길 수 없습니다." )
9+ @ Schema (description = "아티스트 이름입니다." )
810 String artistName ,
911
1012 @ Size (max = 150 , message = "아티스트 그룹 이름은 150자를 넘길 수 없습니다." )
13+ @ Schema (description = "아티스트 소속 그룹입니다. 아티스트 이름이 그룹인 경우, null 로 처리됩니다." )
1114 String artistGroup ,
1215
16+ @ Schema (description = "아티스트 타입입니다." , example = "SOLO or GROUP" )
1317 ArtistType artistType ,
1418
1519 @ Size (max = 30 , message = "장르 이름은 30자를 넘길 수 없습니다." )
20+ @ Schema (description = "장르 이름입니다." )
1621 String genreName
1722) {
1823}
Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .artists .dto .response ;
22
3+ import io .swagger .v3 .oas .annotations .media .Schema ;
4+
35public record AlbumResponse (
6+ @ Schema (description = "앨범 이름입니다." )
47 String albumName ,
8+
9+ @ Schema (description = "앨범 발매일입니다." , format = "yyyy-MM-dd" )
510 String releaseDate ,
6- String albumType , // album / single / ep
11+
12+ @ Schema (description = "앨범 타입입니다." , example = "album or single or ep" )
13+ String albumType ,
14+
15+ @ Schema (description = "앨범 이미지 URL 입니다." )
716 String imageUrl ,
17+
18+ @ Schema (description = "앨범 Spotify URL 입니다." )
819 String spotifyUrl
920) {
1021}
Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .artists .dto .response ;
22
33import com .back .web7_9_codecrete_be .domain .artists .entity .ArtistType ;
4+ import io .swagger .v3 .oas .annotations .media .Schema ;
45
56import java .util .List ;
67
78public record ArtistDetailResponse (
9+ @ Schema (description = "아티스트 이름입니다." )
810 String artistName ,
11+
12+ @ Schema (description = "아티스트 소속 그룹입니다. 아티스트 이름이 그룹인 경우, null 로 처리됩니다." )
913 String artistGroup ,
14+
15+ @ Schema (description = "아티스트 타입입니다." , example = "SOLO or GROUP" )
1016 ArtistType artistType ,
17+
18+ @ Schema (description = "아티스트 프로필 이미지 URL 입니다." )
1119 String profileImageUrl ,
20+
21+ @ Schema (description = "받은 총 좋아요 수(찜한 수) 입니다." )
1222 long likeCount ,
23+
24+ @ Schema (description = "아티스트의 총 앨범 수 입니다." )
1325 int totalAlbums ,
26+
27+ @ Schema (description = "아티스트의 인기도 입니다.(Spotify 기준입니다.)" )
1428 double popularityRating ,
29+
30+ @ Schema (description = "아티스트에 대한 설명입니다." )
1531 String description ,
32+
33+ @ Schema (description = "아티스트가 발매한 앨범 리스트입니다." )
1634 List <AlbumResponse > albums ,
35+
36+ @ Schema (description = "아티스트의 가장 인기 있는 트랙 상위 10개입니다." )
1737 List <TopTrackResponse > topTracks ,
38+
39+ @ Schema (description = "아티스트와 관련 있는 다른 아티스트 목록입니다." )
1840 List <RelatedArtistResponse > relatedArtists
1941) {
2042}
Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .artists .dto .response ;
22
33import com .back .web7_9_codecrete_be .domain .artists .entity .Artist ;
4+ import io .swagger .v3 .oas .annotations .media .Schema ;
45
56public record ArtistListResponse (
7+ @ Schema (description = "아티스트 이름입니다." )
68 String artistName ,
9+
10+ @ Schema (description = "아티스트 소속 그룹입니다. 아티스트 이름이 그룹인 경우, null 로 처리됩니다." )
711 String artistGroup ,
12+
13+ @ Schema (description = "장르 이름입니다." )
814 String genreName
915) {
1016 public static ArtistListResponse from (Artist artist ) {
Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .artists .dto .response ;
22
33import com .back .web7_9_codecrete_be .domain .concerts .entity .Concert ;
4+ import io .swagger .v3 .oas .annotations .media .Schema ;
45
56import java .time .LocalDate ;
67
78public record ConcertListByArtistResponse (
9+ @ Schema (description = "공연명 입니다." )
810 String concertName ,
11+
12+ @ Schema (description = "공연 시작 날짜입니다." , format = "yyyy-MM-dd" )
913 LocalDate startDate ,
14+
15+ @ Schema (description = "공연 장소입니다." )
1016 String concertPlace
1117) {
1218 public static ConcertListByArtistResponse from (Concert concert ) {
Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .artists .dto .response ;
22
3+ import io .swagger .v3 .oas .annotations .media .Schema ;
4+
35public record RelatedArtistResponse (
6+ @ Schema (description = "아티스트 이름입니다." )
47 String artistName ,
8+
9+ @ Schema (description = "아티스트 사진 URL 입니다." )
510 String imageUrl ,
11+
12+ @ Schema (description = "아티스트의 Spotify id 입니다." )
613 String spotifyArtistId
714) {
815}
Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .artists .dto .response ;
22
33import com .back .web7_9_codecrete_be .domain .artists .entity .Artist ;
4+ import io .swagger .v3 .oas .annotations .media .Schema ;
45
56public record SearchResponse (
7+ @ Schema (description = "아티스트 이름입니다." )
68 String artistName ,
9+
10+ @ Schema (description = "아티스트 소속 그룹입니다. 아티스트 이름이 그룹인 경우, null 로 처리됩니다." )
711 String artistGroup ,
12+
13+ @ Schema (description = "받은 총 좋아요 수(찜한 수) 입니다." )
814 int likeCount
915) {
1016 public static SearchResponse from (Artist artist ) {
Original file line number Diff line number Diff line change 11package com .back .web7_9_codecrete_be .domain .artists .dto .response ;
22
3+ import io .swagger .v3 .oas .annotations .media .Schema ;
4+
35public record TopTrackResponse (
6+ @ Schema (description = "노래 제목입니다." )
47 String trackName ,
8+
9+ @ Schema (description = "노래의 Spotify URL 입니다." )
510 String spotifyUrl
611) {
712}
You can’t perform that action at this time.
0 commit comments