Skip to content

Commit

Permalink
RAC-146 refactor : 선배 프로필 정보 수정 리팩토링
Browse files Browse the repository at this point in the history
  • Loading branch information
ywj9811 committed Nov 11, 2023
1 parent 0d5629d commit a356844
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ public class SeniorProfileAndAccountRequest {
private String account;
@NotNull
private String bank;
@NotNull
private String rrn;
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public static Account mapToAccount(SeniorProfileAndAccountRequest profileAndAcco
return Account.builder()
.bank(profileAndAccountPageRequest.getBank())
.account(profileAndAccountPageRequest.getAccount())
.rrn(profileAndAccountPageRequest.getRrn())
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@ public class Account {

@Column(nullable = false)
private String rrn;

public void updateAccount(Account account) {
this.account = account.getAccount();
this.bank = account.getBank();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void updateProfile(Profile profile) {

public void updateProfileAndAccount(Profile profile, Account account) {
this.profile = profile;
this.account = account;
account.updateAccount(account);
}

public void updateCertification(String certification) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@RequiredArgsConstructor
public enum SeniorResponseMessage {
CREATE_SENIOR("대학원생 가입에 성공하였습니다."),
UPDATE_PROFILE("대학원생 프로필 등록에 성공하였습니다"),
UPDATE_PROFILE("대학원생 프로필 수정에 성공하였습니다"),
GET_SENIOR_INFO("대학원생 정보 조회에 성공하였습니다"),
GET_SENIOR_PROFILE("대학원생 프로필 조회에 성공하였습니다"),
UPDATE_CERTIFICATION("대학원생 인증사진 업로드에 성공하였습니다"),
Expand Down

0 comments on commit a356844

Please sign in to comment.