-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
117 additions
and
22 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
56 changes: 56 additions & 0 deletions
56
src/main/java/umc/kkijuk/server/record/domain/Education.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,56 @@ | ||
package umc.kkijuk.server.record.domain; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import umc.kkijuk.server.career.domain.base.BaseEntity; | ||
import umc.kkijuk.server.introduce.domain.Introduce; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Table(name="education") | ||
@Getter | ||
@NoArgsConstructor | ||
public class Education extends BaseEntity { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "record_id", nullable = false) | ||
private Record record; | ||
|
||
private String category; | ||
private String schoolName; | ||
private String major; | ||
private String state; | ||
private LocalDateTime admissionDate; | ||
private LocalDateTime graduationDate; | ||
|
||
@Builder | ||
public Education(String category, String schoolName, String major | ||
, String state, LocalDateTime admissionDate, LocalDateTime graduationDate) { | ||
this.category = category; | ||
this.schoolName = schoolName; | ||
this.major = major; | ||
this.state = state; | ||
this.admissionDate = admissionDate; | ||
this.graduationDate = graduationDate; | ||
} | ||
|
||
public void setRecord(Record record) { | ||
this.record = record; | ||
} | ||
|
||
public void update(String category, String schoolName, String major | ||
, String state, LocalDateTime admissionDate, LocalDateTime graduationDate) { | ||
this.category = category; | ||
this.schoolName = schoolName; | ||
this.major = major; | ||
this.state = state; | ||
this.admissionDate = admissionDate; | ||
this.graduationDate = graduationDate; | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/umc/kkijuk/server/record/domain/EducationRepository.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,6 @@ | ||
package umc.kkijuk.server.record.domain; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface EducationRepository extends JpaRepository<Education, Long> { | ||
} |
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
5 changes: 0 additions & 5 deletions
5
src/main/java/umc/kkijuk/server/record/domain/RecordRepository.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
32 changes: 32 additions & 0 deletions
32
src/main/java/umc/kkijuk/server/record/dto/EducationDto.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,32 @@ | ||
package umc.kkijuk.server.record.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import umc.kkijuk.server.introduce.domain.Question; | ||
import umc.kkijuk.server.record.domain.Education; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@Builder | ||
public class EducationDto { | ||
private String category; | ||
private String schoolName; | ||
private String major; | ||
private String state; | ||
private LocalDateTime admissionDate; | ||
private LocalDateTime graduationDate; | ||
|
||
public EducationDto(Education education) { | ||
this.category = education.getCategory(); | ||
this.schoolName = education.getSchoolName(); | ||
this.major = education.getMajor(); | ||
this.state = education.getState(); | ||
this.admissionDate = education.getAdmissionDate(); | ||
this.graduationDate = education.getGraduationDate(); | ||
} | ||
} |