-
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.
* [FEAT] 프로젝트 요청 도메인 구현 * [FEAT] 잔디력 감소를 위한 임시 함수 구현 * [FEAT] 프로젝트 취소 기능 구
- Loading branch information
Showing
11 changed files
with
160 additions
and
5 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
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
52 changes: 52 additions & 0 deletions
52
src/main/java/io/oeid/mogakgo/domain/project_join_req/domain/entity/ProjectJoinRequest.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 io.oeid.mogakgo.domain.project_join_req.domain.entity; | ||
|
||
import io.oeid.mogakgo.domain.project.domain.entity.Project; | ||
import io.oeid.mogakgo.domain.project_join_req.domain.entity.enums.RequestStatus; | ||
import io.oeid.mogakgo.domain.user.domain.User; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.EntityListeners; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import jakarta.persistence.Table; | ||
import java.time.LocalDateTime; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.springframework.data.annotation.CreatedDate; | ||
import org.springframework.data.jpa.domain.support.AuditingEntityListener; | ||
|
||
@Getter | ||
@Entity | ||
@Table(name = "project_join_request_tb") | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@EntityListeners(AuditingEntityListener.class) | ||
public class ProjectJoinRequest { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "id") | ||
private Long id; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "sender_id", updatable = false) | ||
private User sender; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "join_request_status") | ||
private RequestStatus requestStatus; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "project_id", updatable = false) | ||
private Project project; | ||
|
||
@CreatedDate | ||
@Column(name = "created_at") | ||
private LocalDateTime createdAt; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/io/oeid/mogakgo/domain/project_join_req/domain/entity/enums/RequestStatus.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,14 @@ | ||
package io.oeid.mogakgo.domain.project_join_req.domain.entity.enums; | ||
|
||
public enum RequestStatus { | ||
PENDING("요청 대기중"), | ||
ACCEPTED("요청 수락됨"), | ||
REJECTED("요청 거절됨"); | ||
|
||
private final String description; | ||
|
||
RequestStatus(String description) { | ||
this.description = description; | ||
} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
...o/oeid/mogakgo/domain/project_join_req/infrastruture/ProjectJoinRequestJpaRepository.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 io.oeid.mogakgo.domain.project_join_req.infrastruture; | ||
|
||
import io.oeid.mogakgo.domain.project_join_req.domain.entity.ProjectJoinRequest; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface ProjectJoinRequestJpaRepository extends JpaRepository<ProjectJoinRequest, Long> { | ||
|
||
boolean existsByProjectId(Long projectId); | ||
|
||
} |
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