- 
                Notifications
    
You must be signed in to change notification settings  - Fork 0
 
[feat] 솜커톤 API GitHub & 포트폴리오 링크 추가 #105
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
Conversation
- SomParticipantServiceTest (테스트)
- SomParticipant (엔티티) - SomParticipantRequestDto (요청 DTO) - SomParticipantResponseDto (응답 DTO) - SomParticipantService (서비스)
| 
           시간 되실 때 코드 리뷰 한 번만 부탁드리겠습니다!  | 
    
| @Schema(description = "이메일 주소", example = "[email protected]", required = true) | ||
| private String email; // 이메일 | ||
| 
               | 
          ||
| @NotBlank(message = "GitHub 주소는 필수 입력 값입니다.") | 
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.
Github 주소는 필수입력값이 아니라 있으면 넣는걸로 바꿔주세요
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.
수정 완료했습니다!
| @Column(nullable = false) | ||
| private String email; // 이메일 | ||
| 
               | 
          ||
| @Column(nullable = false) | 
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.
nullable 제약조건 없애주세요
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.
수정 완료했습니다!
- SomParticipant (엔티티) - SomParticipantRequestDto (요청 DTO)
| import org.hibernate.validator.constraints.URL; | ||
| 
               | 
          ||
| @Getter | ||
| @Setter | 
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.
requestDto는 객체 생성 후 변하면 안되어서 @Setter 제거 후 내부 필드 전부 final로 수정해주시면 감사하겠습니다. 그리고 추가로 @AllArgsConstructor 추가해서 빌더 패턴 유지해주시면 될 것 같습니다. 이 내용은 불변성 관련 내용이라서 DTO 불변성 이나 불변 객체 DTO 이런식으로 검색하시면 자료가 많을겁니다. (umc 워크북에서도 하셨던 내용이라 보시면 바로 이해하실거에요)
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.
넵 리뷰 감사합니다! 수정 완료했습니다!
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.
/**
 * Entity → Response DTO 변환 메서드
 */
private SomParticipantResponseDto toResponseDto(SomParticipant participant) {
    return SomParticipantResponseDto.builder()
            .id(participant.getId())
            .participantName(participant.getParticipantName())
            .studentId(participant.getStudentId())
            .department(participant.getDepartment())
            .grade(participant.getGrade())
            .contact(participant.getContact())
            .email(participant.getEmail())
            .githubLink(participant.getGithubLink())
            .portfolioLink(participant.getPortfolioLink())
            .build();
이 부분을 서비스단에서 처리하는게 아니라 엔티티 단계에서 처리하도록 수정해주세요!
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.
넵 리뷰 감사합니다! 수정 완료했습니다!
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.
SomParticipantService.toResponseDto() 로직을 여기 하단에 추가해주심 됩니다. 엔티티 캡슐화나 책임 분리? 라는 내용으로 찾아보심 될 것 같아요
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.
넵 리뷰 감사합니다! 수정 완료했습니다!
- SomParticipantServiceTest - Setter 방식 -> Builder 방식 - Update 테스트 코드 추가
- SomParticipant : toResponseDto 메서드 추가 및 구조 개선 - SomParticipantRequestDto : 불변 객체 및 빌더 패턴으로 변경 - SomParticipantService : DTO 변환 로직 엔티티로 위임
[feat] 솜커톤 API GitHub & 포트폴리오 링크 추가
😺 Issue
🔄 변경 내용
[ feat ]
[ test ]
[ refactor ]
✅ 체크리스트
🧪 테스트
💻 테스트 화면
< 초기 >
< 수정 >