Skip to content
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

[FEATURE] 스위치(완료 여부) 변경 기능 API 구현 #204

Merged
merged 10 commits into from
May 21, 2024

Conversation

shindong96
Copy link
Member

작업 내용

  • isCompleted 칼럼이 Application 테이블에 추가됩니다.
  • 변경 요청에 따라 변경

주의 사항

  • 기존 조회의 where문에 isCompleted = false 를 추가해야 합니다.
  • 스위치 연타와 같은 문제를 방지하기 위해 response에 성공했다면 무슨 상태로 변동됐는지 알려줍니다.

resolve #200

@shindong96 shindong96 requested a review from kyukong May 7, 2024 12:02
@shindong96 shindong96 self-assigned this May 7, 2024
Copy link
Member

@kyukong kyukong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

되게 빠르게 반영해주셨네요!! 수고 많으셨습니다!

assertThat(response.getIsCompleted()).isEqualTo(request.getIsCompleted());
}

@DisplayName("기존 상태로의 변경을 요청한다면 예외를 발생한다.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

꼼꼼한 테스트 👍

Comment on lines 20 to 28
public Application(Long id, String companyName, String team, String location, String contact, String position,
String specificPosition, String jobDescription, String workType, EmploymentType employmentType,
String careerRequirement, String requiredCapability, String preferredQualification, Processes processes,
String url, Process currentProcess) {
String url, Process currentProcess, CompletedSwitch completedSwitch) {
super(id, companyName, team, location, contact, position, specificPosition, jobDescription, workType,
employmentType, careerRequirement, requiredCapability, preferredQualification, processes, url);
this.currentProcess = currentProcess;
this.completedSwitch = completedSwitch;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

빌더 패턴을 적용하는 것도 좋아보입니다!! ㅎㅎ

@Getter
public class CompletedSwitch {

private boolean isCompleted;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

왜 불변으로 관리하지 않는지 궁금합니다!!

Copy link
Member Author

@shindong96 shindong96 May 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

�객체에서 값을 변동할 수 있게 하는 방식으로 구현하고 싶었습니다! 그런데 저희가 이제껏 새로운 객체 반환으로 했던거 같네요ㅠㅠ이야기 해보아요ㅠ

@@ -67,6 +69,13 @@ public ResponseEntity<GohigherResponse<Void>> updateSpecifically(@Login Long use
return ResponseEntity.ok(GohigherResponse.success(null));
}

@PatchMapping("/{applicationId}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URI 가 /v1/applications/{applicationId} 인데 스위치 값 하나만 바꾸고 있습니당 포괄적인 URI 를 사용할 경우 나중에 기능이 확장되면 겹칠 가능성이 있어 보여요. URI 에 스위치 관련 정보를 넣으면 어떨까요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그러네요! 수정하겠습니다ㅎㅎ

@shindong96 shindong96 merged commit f375b24 into develop May 21, 2024
1 check passed
@shindong96 shindong96 deleted the feature/#200/application-visible-switch branch May 21, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

지원서 숨기기, 보여주기 기능을 구현한다.
2 participants