-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
프로덕션 코드 리팩토링 #206
프로덕션 코드 리팩토링 #206
Changes from 8 commits
47dd4e8
39ca320
d3fc1c4
753b9ff
a36c0db
dac9f82
801d056
e251f40
e52869b
e82e925
6485732
f3d595e
ec6d992
c3506b8
e003ee1
cd63a4e
b9ea267
25dd8e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package coffeemeet.server.admin.presentation.dto; | ||
|
||
import static lombok.AccessLevel.PRIVATE; | ||
|
||
import coffeemeet.server.report.service.dto.GroupReportDto; | ||
import java.util.List; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = PRIVATE) | ||
public final class GroupReportHTTP { | ||
|
||
public record Response(List<GroupReportDto> groupReports) { | ||
|
||
public static Response from(List<GroupReportDto> responses) { | ||
return new Response(responses); | ||
} | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
import coffeemeet.server.certification.domain.Certification; | ||
|
||
public record PendingCertification( | ||
public record PendingCertificationDto( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이건 Dto을 제거하는게 맞아보는데요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이것도 위에서 커멘트에서 작성한 것과 같이 같은 의미로 통일성을 주고자 dto를 붙였습니다. |
||
Long certificationId, | ||
String nickname, | ||
String companyName, | ||
|
@@ -11,8 +11,8 @@ public record PendingCertification( | |
String department | ||
) { | ||
|
||
public static PendingCertification from(Certification certification) { | ||
return new PendingCertification( | ||
public static PendingCertificationDto from(Certification certification) { | ||
return new PendingCertificationDto( | ||
certification.getId(), | ||
certification.getUser().getProfile().getNickname(), | ||
certification.getCompanyName(), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,11 @@ | |
import org.springframework.data.domain.Page; | ||
|
||
public record PendingCertificationPageDto( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 얘가 Dto이기 떄문에 Page 안에 값은 Dto보단 PendingCertification인 VO로 그대로 두는게 적절해 보입니다 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 전달 객체는 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PendingCertificationPageDto |
||
Page<PendingCertification> page | ||
Page<PendingCertificationDto> page | ||
) { | ||
|
||
public static PendingCertificationPageDto from(Page<PendingCertificationDto> page) { | ||
return new PendingCertificationPageDto(page); | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 왜 Dto 인가여
HTTP.Response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AdminCustomSlice는 HTTP 대신 Slice로 반환하고 있습니다.
단일 dto는
Dto -> HTTP 로
복수 dto는
Dto 여러개가 -> Slice로
반환 되기 때문에 통일성을 주고자 이렇게 했습니다.