-
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.
GETP-208 refactor: 영속성 관련 기능을 persistence adapter로 분리
- Loading branch information
Showing
22 changed files
with
209 additions
and
153 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/main/java/es/princip/getp/application/project/apply/ProjectApplicationService.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
2 changes: 1 addition & 1 deletion
2
...ption/AlreadyAppliedProjectException.java → ...ption/AlreadyAppliedProjectException.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
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
19 changes: 10 additions & 9 deletions
19
src/main/java/es/princip/getp/domain/common/model/AttachmentFile.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
28 changes: 14 additions & 14 deletions
28
src/main/java/es/princip/getp/domain/common/model/Duration.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
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
11 changes: 0 additions & 11 deletions
11
src/main/java/es/princip/getp/domain/project/apply/ProjectApplicationRepository.java
This file was deleted.
Oops, something went wrong.
66 changes: 20 additions & 46 deletions
66
src/main/java/es/princip/getp/domain/project/apply/model/ProjectApplication.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
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
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
54 changes: 54 additions & 0 deletions
54
...n/java/es/princip/getp/persistence/adapter/project/apply/ProjectApplicationJpaEntity.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,54 @@ | ||
package es.princip.getp.persistence.adapter.project.apply; | ||
|
||
import es.princip.getp.domain.project.apply.model.ProjectApplicationStatus; | ||
import es.princip.getp.persistence.adapter.BaseTimeJpaEntity; | ||
import es.princip.getp.persistence.adapter.common.DurationJpaVO; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Getter | ||
@Entity | ||
@Builder | ||
@AllArgsConstructor | ||
@Table(name = "project_application") | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
class ProjectApplicationJpaEntity extends BaseTimeJpaEntity { | ||
|
||
@Id | ||
@Column(name = "project_application_id") | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long applicationId; | ||
|
||
@Column(name = "people_id") | ||
private Long applicantId; | ||
|
||
@Column(name = "project_id") | ||
private Long projectId; | ||
|
||
@Embedded | ||
@AttributeOverrides( | ||
{ | ||
@AttributeOverride(name = "startDate", column = @Column(name = "expected_start_date")), | ||
@AttributeOverride(name = "endDate", column = @Column(name = "expected_end_date")) | ||
} | ||
) | ||
private DurationJpaVO expectedDuration; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "status") | ||
private ProjectApplicationStatus applicationStatus; | ||
|
||
@Column(name = "description") | ||
private String description; | ||
|
||
@Builder.Default | ||
@ElementCollection | ||
@CollectionTable( | ||
name = "project_application_attachment_file", | ||
joinColumns = @JoinColumn(name = "project_application_id") | ||
) | ||
private List<String> attachmentFiles = new ArrayList<>(); | ||
} |
10 changes: 10 additions & 0 deletions
10
...va/es/princip/getp/persistence/adapter/project/apply/ProjectApplicationJpaRepository.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,10 @@ | ||
package es.princip.getp.persistence.adapter.project.apply; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
interface ProjectApplicationJpaRepository extends JpaRepository<ProjectApplicationJpaEntity, Long> { | ||
|
||
boolean existsByApplicantIdAndProjectId(Long applicantId, Long projectId); | ||
} |
Oops, something went wrong.