Skip to content

Commit

Permalink
feat: 노동자 회원가입 시 주민등록번호, 계좌번호 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
dgjinsu committed Jan 13, 2025
1 parent 6a7be1a commit 2a18d95
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ public class JoinWorkerRequest {
@Schema(description = "회원 타입 [ROLE_WORKER or ROLE_REGISTER]", example = "ROLE_WORKER")
@NotNull
private Role role; // 회원 타입
@Schema(description = "계좌 번호", example = "12341234123412")
@NotBlank
private String account; // 계좌 번호
@Schema(description = "은행 종류", example = "국민은행")
@NotBlank
private String bank; // 은행
Expand All @@ -62,9 +59,6 @@ public class JoinWorkerRequest {
@Schema(description = "생년월일", example = "19750101")
@NotBlank
private String birth; // 생년월일
@Schema(description = "주민등록번호", example = "750101-1752442")
@NotBlank
private String rrn; // 생년월일
@Schema(description = "성별 [MALE or FEMAILE]", example = "MALE")
@NotNull
private Gender gender; // 성별
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/jikgong/domain/member/entity/Company.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@Getter
public class Company {

@Column(unique = true, nullable = false)
private String account; // 계좌
private String businessNumber; // 사업자 번호
private String region; // 지역
private String companyName; // 회사 명
Expand All @@ -23,8 +25,9 @@ public class Company {
private CompanyNotificationInfo companyNotificationInfo; // 기업 알림 정보

@Builder
public Company(String businessNumber, String region, String companyName, String manager,
public Company(String account, String businessNumber, String region, String companyName, String manager,
String requestContent, Boolean isNotification) {
this.account = account;
this.businessNumber = businessNumber;
this.region = region;
this.companyName = companyName;
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/jikgong/domain/member/entity/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ public class Member extends BaseEntity {
@Column(unique = true, nullable = false)
private String email; // 이메일

@Column(unique = true, nullable = false)
private String account; // 계좌
@Column(nullable = false)
private String bank; // 은행 종류
private Boolean privacyConsent; // 개인정보 동의 여부
Expand Down Expand Up @@ -79,14 +77,13 @@ public String toString() {
}

@Builder
public Member(String loginId, String password, String phone, String email, String account, String bank,
public Member(String loginId, String password, String phone, String email, String bank,
Boolean privacyConsent,
String deviceToken, Role role, Worker workerInfo, Company companyInfo) {
this.loginId = loginId;
this.password = password;
this.phone = phone;
this.email = email;
this.account = account;
this.bank = bank;
this.privacyConsent = privacyConsent;
this.deviceToken = deviceToken;
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/jikgong/domain/member/entity/Worker.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class Worker {

private String workerName; // 노동자 이름
private String birth; // 생년월일
private String rrn; // 주민등록번호
@Enumerated(value = EnumType.STRING)
private Gender gender; // 성별
private Nationality nationality; // 국적
Expand All @@ -35,12 +34,11 @@ public class Worker {
private WorkerNotificationInfo workerNotificationInfo; // 노동자 알림 정보

@Builder
public Worker(String workerName, String birth, String rrn, Gender gender, Nationality nationality,
public Worker(String workerName, String birth, Gender gender, Nationality nationality,
Boolean hasVisa, Boolean hasEducationCertificate, Boolean hasWorkerCard, Boolean credentialLiabilityConsent,
Boolean isNotification) {
this.workerName = workerName;
this.birth = birth;
this.rrn = rrn;
this.gender = gender;
this.nationality = nationality;
this.hasVisa = hasVisa;
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/jikgong/domain/member/service/JoinService.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public Long joinWorkerMember(JoinWorkerRequest request) {
Worker worker = Worker.builder()
.workerName(request.getWorkerName())
.birth(request.getBirth())
.rrn(request.getRrn())
.gender(request.getGender())
.nationality(request.getNationality())
.hasVisa(request.getHasVisa())
Expand All @@ -69,7 +68,6 @@ public Long joinWorkerMember(JoinWorkerRequest request) {
.password(encoder.encode(request.getPassword()))
.phone(request.getPhone())
.email(request.getEmail())
.account(request.getAccount())
.bank(request.getBank())
.privacyConsent((request.getPrivacyConsent()))
.role(request.getRole())
Expand All @@ -80,7 +78,11 @@ public Long joinWorkerMember(JoinWorkerRequest request) {
// 위치 정보 생성
Location location = Location.builder()
.address(
new Address(request.getAddress(), request.getLatitude(), request.getLongitude()))
new Address(
request.getAddress(),
request.getLatitude(),
request.getLongitude())
)
.isMain(true)
.member(member)
.build();
Expand Down Expand Up @@ -109,6 +111,7 @@ public Long joinCompanyMember(JoinCompanyRequest request) {

// 기업 정보
Company company = Company.builder()
.account(request.getAccount())
.businessNumber(request.getBusinessNumber())
.region(request.getRegion())
.companyName(request.getCompanyName())
Expand All @@ -123,7 +126,6 @@ public Long joinCompanyMember(JoinCompanyRequest request) {
.password(encoder.encode(request.getPassword()))
.phone(request.getPhone())
.email(request.getEmail())
.account(request.getAccount())
.bank(request.getBank())
.privacyConsent((request.getPrivacyConsent()))
.role(request.getRole())
Expand Down

0 comments on commit 2a18d95

Please sign in to comment.