-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #192 from ITZipProject/feature/resume
🛠️ 리팩토링 : 이력서 구조 변경 및 update로직 수정
- Loading branch information
Showing
71 changed files
with
1,024 additions
and
820 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/main/java/darkoverload/itzip/feature/resume/domain/resume/ProfileInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package darkoverload.itzip.feature.resume.domain.resume; | ||
|
||
import darkoverload.itzip.feature.resume.code.PublicOnOff; | ||
import darkoverload.itzip.feature.resume.entity.ProfileInfoEntity; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@ToString | ||
@EqualsAndHashCode | ||
public class ProfileInfo { | ||
// 이메일 | ||
private final String email; | ||
|
||
// 핸드폰 | ||
private final String phone; | ||
|
||
// 제목 | ||
private final String subject; | ||
|
||
// 소개글 | ||
private final String introduction; | ||
|
||
// 공개여부 | ||
private final PublicOnOff publicOnOff; | ||
|
||
|
||
@Builder | ||
public ProfileInfo(String email, String phone, String subject, String introduction, PublicOnOff publicOnOff) { | ||
this.email = email; | ||
this.phone = phone; | ||
this.subject = subject; | ||
this.introduction = introduction; | ||
this.publicOnOff = publicOnOff; | ||
} | ||
|
||
public ProfileInfoEntity toEntity() { | ||
return ProfileInfoEntity.builder() | ||
.email(this.email) | ||
.introduction(this.introduction) | ||
.phone(this.phone) | ||
.subject(this.subject) | ||
.publicOnOff(this.publicOnOff) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/main/java/darkoverload/itzip/feature/resume/entity/ProfileInfoEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package darkoverload.itzip.feature.resume.entity; | ||
|
||
import darkoverload.itzip.feature.resume.code.PublicOnOff; | ||
import darkoverload.itzip.feature.resume.domain.resume.ProfileInfo; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Embeddable; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import lombok.*; | ||
|
||
@Embeddable | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@EqualsAndHashCode | ||
@ToString | ||
public class ProfileInfoEntity { | ||
private String email; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name="public_on_off", nullable = false) | ||
private PublicOnOff publicOnOff; | ||
|
||
@Column(length=50) | ||
private String subject; | ||
|
||
@Column(length=50) | ||
private String phone; | ||
|
||
@Column(length=5000) | ||
private String introduction; | ||
|
||
@Builder | ||
public ProfileInfoEntity(String email, PublicOnOff publicOnOff, String subject, String phone, String introduction) { | ||
this.email = email; | ||
this.publicOnOff = publicOnOff; | ||
this.subject = subject; | ||
this.phone = phone; | ||
this.introduction = introduction; | ||
} | ||
|
||
|
||
|
||
public ProfileInfo convertToDomain() { | ||
return ProfileInfo.builder() | ||
.email(this.email) | ||
.introduction(this.introduction) | ||
.publicOnOff(this.publicOnOff) | ||
.subject(this.subject) | ||
.phone(this.phone) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.