-
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.
Merge pull request #192 from PawWithU/feat/189-notification-send-and-…
…save [Feature] 알림 전송 구현 및 알림 목록 조회를 위한 Entity 생성
- Loading branch information
Showing
11 changed files
with
225 additions
and
20 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
36 changes: 36 additions & 0 deletions
36
...ain/java/com/pawwithu/connectdog/domain/notification/entity/IntermediaryNotification.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,36 @@ | ||
package com.pawwithu.connectdog.domain.notification.entity; | ||
|
||
import com.pawwithu.connectdog.common.entity.BaseTimeEntity; | ||
import com.pawwithu.connectdog.domain.intermediary.entity.Intermediary; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
@Entity | ||
public class IntermediaryNotification extends BaseTimeEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
private String image; | ||
@Column(nullable = false) | ||
private String title; | ||
@Column(nullable = false) | ||
private String body; | ||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "intermediary_id", nullable = false) | ||
private Intermediary intermediary; // 이동봉사 중개 id | ||
@Column(nullable = false) | ||
private Boolean isRead; | ||
|
||
@Builder | ||
public IntermediaryNotification(String image, String title, String body, Intermediary intermediary, Boolean isRead) { | ||
this.image = image; | ||
this.title = title; | ||
this.body = body; | ||
this.intermediary = intermediary; | ||
this.isRead = isRead; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/com/pawwithu/connectdog/domain/notification/entity/VolunteerNotification.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,36 @@ | ||
package com.pawwithu.connectdog.domain.notification.entity; | ||
|
||
import com.pawwithu.connectdog.common.entity.BaseTimeEntity; | ||
import com.pawwithu.connectdog.domain.volunteer.entity.Volunteer; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
@Entity | ||
public class VolunteerNotification extends BaseTimeEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
private String image; | ||
@Column(nullable = false) | ||
private String title; | ||
@Column(nullable = false) | ||
private String body; | ||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "volunteer_id", nullable = false) | ||
private Volunteer volunteer; // 이동봉사자 id | ||
@Column(nullable = false) | ||
private Boolean isRead; | ||
|
||
@Builder | ||
public VolunteerNotification(String image, String title, String body, Volunteer volunteer, Boolean isRead) { | ||
this.image = image; | ||
this.title = title; | ||
this.body = body; | ||
this.volunteer = volunteer; | ||
this.isRead = isRead; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...awwithu/connectdog/domain/notification/repository/IntermediaryNotificationRepository.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 com.pawwithu.connectdog.domain.notification.repository; | ||
|
||
import com.pawwithu.connectdog.domain.notification.entity.IntermediaryNotification; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface IntermediaryNotificationRepository extends JpaRepository<IntermediaryNotification, Long> { | ||
} |
7 changes: 7 additions & 0 deletions
7
...m/pawwithu/connectdog/domain/notification/repository/VolunteerNotificationRepository.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 com.pawwithu.connectdog.domain.notification.repository; | ||
|
||
import com.pawwithu.connectdog.domain.notification.entity.VolunteerNotification; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface VolunteerNotificationRepository extends JpaRepository<VolunteerNotification, Long> { | ||
} |
Oops, something went wrong.