-
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.
[SAMBAD-254]-HandWaving 엔티티 작성 (#106)
* [SAMBAD-254]-feat: Poking 엔티티 작성 * [SAMBAD-254]-feat: Poking controller service repository 추가 * [SAMBAD-254]-refactor: poking에서 handWaving으로 변경
- Loading branch information
Showing
8 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...java/org/depromeet/sambad/moring/meeting/handWaving/application/HandWavingRepository.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,4 @@ | ||
package org.depromeet.sambad.moring.meeting.handWaving.application; | ||
|
||
public interface HandWavingRepository { | ||
} |
13 changes: 13 additions & 0 deletions
13
...in/java/org/depromeet/sambad/moring/meeting/handWaving/application/HandWavingService.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,13 @@ | ||
package org.depromeet.sambad.moring.meeting.handWaving.application; | ||
|
||
import org.depromeet.sambad.moring.meeting.member.application.MeetingMemberService; | ||
import org.springframework.stereotype.Service; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class HandWavingService { | ||
private final HandWavingRepository handWavingRepository; | ||
private final MeetingMemberService meetingMemberService; | ||
} |
41 changes: 41 additions & 0 deletions
41
src/main/java/org/depromeet/sambad/moring/meeting/handWaving/domain/HandWaving.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,41 @@ | ||
package org.depromeet.sambad.moring.meeting.handWaving.domain; | ||
|
||
import static jakarta.persistence.EnumType.STRING; | ||
|
||
import org.depromeet.sambad.moring.common.domain.BaseTimeEntity; | ||
import org.depromeet.sambad.moring.meeting.member.domain.MeetingMember; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Entity; | ||
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 lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@Entity | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class HandWaving extends BaseTimeEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "hand_waving_id") | ||
private Long id; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "sender_id") | ||
private MeetingMember sender; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "receiver_id") | ||
private MeetingMember receiver; | ||
|
||
@Enumerated(STRING) | ||
private HandWavingStatus status; | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/org/depromeet/sambad/moring/meeting/handWaving/domain/HandWavingStatus.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,5 @@ | ||
package org.depromeet.sambad.moring.meeting.handWaving.domain; | ||
|
||
public enum HandWavingStatus { | ||
REQUESTED, ACCEPTED, REJECTED | ||
} |
7 changes: 7 additions & 0 deletions
7
...rg/depromeet/sambad/moring/meeting/handWaving/infrastructure/HandWavingJpaRepository.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,7 @@ | ||
package org.depromeet.sambad.moring.meeting.handWaving.infrastructure; | ||
|
||
import org.depromeet.sambad.moring.meeting.handWaving.domain.HandWaving; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface HandWavingJpaRepository extends JpaRepository<HandWaving, Long> { | ||
} |
12 changes: 12 additions & 0 deletions
12
...g/depromeet/sambad/moring/meeting/handWaving/infrastructure/HandWavingRepositoryImpl.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,12 @@ | ||
package org.depromeet.sambad.moring.meeting.handWaving.infrastructure; | ||
|
||
import org.depromeet.sambad.moring.meeting.handWaving.application.HandWavingRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@Repository | ||
@RequiredArgsConstructor | ||
public class HandWavingRepositoryImpl implements HandWavingRepository { | ||
private final HandWavingJpaRepository handWavingJpaRepository; | ||
} |
16 changes: 16 additions & 0 deletions
16
...ava/org/depromeet/sambad/moring/meeting/handWaving/presentation/HandWavingController.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,16 @@ | ||
package org.depromeet.sambad.moring.meeting.handWaving.presentation; | ||
|
||
import org.depromeet.sambad.moring.meeting.handWaving.application.HandWavingService; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Tag(name = "손 흔들어 인사하기", description = "손 흔들어 인사하기 관련 api / 담당자 : 이한음") | ||
@RequiredArgsConstructor | ||
@RestController | ||
@RequestMapping("/v1") | ||
public class HandWavingController { | ||
private final HandWavingService handWavingService; | ||
} |
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