99
1010import java .time .LocalDate ;
1111import java .time .LocalDateTime ;
12+ import java .util .List ;
1213
1314public class UserDto {
1415
@@ -54,12 +55,6 @@ public static class UserResponse {
5455 @ Schema (description = "사용자 프로필 이미지" )
5556 private FileDto .FileResponse profileImage ;
5657
57- @ Schema (description = "계정 생성 시간" , example = "ISO Datetime" )
58- private LocalDateTime createdAt ;
59-
60- @ Schema (description = "마지막 정보 수정 시간" , example = "ISO Datetime" )
61- private LocalDateTime lastModifiedAt ;
62-
6358 public static UserResponse from (User user ) {
6459 boolean isNewUser = user .isSocialUser ()
6560 && (user .getBirthday () == null || user .getGender () == null );
@@ -76,8 +71,6 @@ public static UserResponse from(User user) {
7671 .profileImage (FileDto .FileResponse .from (user .getProfileImage ()))
7772 .socialLogin (user .getSocialLogin () == null ? null : user .getSocialLogin ())
7873 .isNewUser (isNewUser )
79- .createdAt (user .getCreatedAt ())
80- .lastModifiedAt (user .getLastModifiedAt ())
8174 .build ();
8275 }
8376 }
@@ -109,4 +102,91 @@ public static RankTop10Response of(Integer rank, User user) {
109102 .build ();
110103 }
111104 }
105+
106+ @ Getter
107+ @ NoArgsConstructor
108+ @ AllArgsConstructor
109+ public static class MyPageResponse {
110+
111+ @ Schema (description = "현재 레벨" , example = "37" )
112+ private int level ;
113+
114+ @ Schema (description = "현재 티어" , example = "SILVER" )
115+ private TierDto .TierResponse tier ;
116+
117+ @ Schema (description = "티어 진행률 (%)" , example = "45" )
118+ private int tierProgressPercent ;
119+
120+ @ Schema (
121+ description = "다음 티어 (다이아몬드인 경우 null)" ,
122+ example = "GOLD" ,
123+ nullable = true
124+ )
125+ private TierDto .TierResponse nextTier ;
126+ }
127+
128+ @ Data
129+ @ Builder
130+ @ NoArgsConstructor
131+ @ AllArgsConstructor
132+ @ Schema (description = "프로필 조회 응답" )
133+ public static class ProfileResponse {
134+
135+ @ Schema (description = "유저 아이디(DB PK)" , example = "1" )
136+ private Long userId ;
137+
138+ @ Schema (description = "프로필 이미지" )
139+ private FileDto .FileResponse profileImage ;
140+
141+ @ Schema (description = "유저 닉네임" , example = "닉네임" )
142+ private String nickname ;
143+
144+ @ Schema (description = "로그인 아이디" , example = "testuser1" )
145+ private String loginId ;
146+
147+ @ Schema (description = "티어 정보" )
148+ private TierDto .TierResponse tier ;
149+
150+ @ Schema (description = "레벨" , example = "1" )
151+ private Integer level ;
152+
153+ @ Schema (description = "관심사(태그)" , example = "[\" 태그1\" ]" )
154+ private List <String > tags ;
155+
156+ @ Schema (description = "관심 분야" , example = "[\" IT\" ]" )
157+ private List <String > fields ;
158+
159+ @ Schema (description = "전체 챌린지 기록" )
160+ private ChallengeRecord allChallengeRecord ;
161+
162+ @ Schema (description = "SOLO 기록" )
163+ private ChallengeRecord soloChallengeRecord ;
164+
165+ @ Schema (description = "VS 기록" )
166+ private ChallengeRecord vsChallengeRecord ;
167+
168+ @ Schema (description = "본인 프로필 여부" )
169+ private Boolean isMine ;
170+ }
171+
172+ @ Data
173+ @ Builder
174+ @ NoArgsConstructor
175+ @ AllArgsConstructor
176+ @ Schema (description = "챌린지 기록(시도/성공/실패/성공률)" )
177+ public static class ChallengeRecord {
178+
179+ @ Schema (description = "성공률(0~100)" )
180+ private Double successRate ;
181+
182+ @ Schema (description = "시도 횟수" , example = "30" )
183+ private Long attemptCount ;
184+
185+ @ Schema (description = "성공 횟수" , example = "20" )
186+ private Long successCount ;
187+
188+ @ Schema (description = "실패 횟수" , example = "10" )
189+ private Long failCount ;
190+
191+ }
112192}
0 commit comments