-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: table adjustments due to the addition of future notifications, …
…pins, etc
- Loading branch information
1 parent
a736299
commit f77d0bd
Showing
11 changed files
with
115 additions
and
28 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
2 changes: 0 additions & 2 deletions
2
src/main/java/project/linkarchive/backend/notification/NoArgsConstructor.java
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
src/main/java/project/linkarchive/backend/notification/Notification.java
This file was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
src/main/java/project/linkarchive/backend/notification/domain/Notification.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,48 @@ | ||
package project.linkarchive.backend.notification.domain; | ||
|
||
|
||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import project.linkarchive.backend.advice.entityBase.CreatedEntity; | ||
import project.linkarchive.backend.notification.enums.NotificationRead; | ||
import project.linkarchive.backend.notification.enums.NotificationType; | ||
import project.linkarchive.backend.user.domain.User; | ||
|
||
import javax.persistence.*; | ||
|
||
@Getter | ||
@Entity | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Notification extends CreatedEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "notification_id") | ||
private Long id; | ||
|
||
@Enumerated(EnumType.STRING) | ||
private NotificationType notificationType; | ||
|
||
@Enumerated(EnumType.STRING) | ||
private NotificationRead notificationRead; | ||
|
||
private Long relationshipId; | ||
private Long bookmarkId; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "user_id") | ||
private User user; | ||
|
||
@Builder | ||
public Notification(Long id, NotificationType notificationType, NotificationRead notificationRead, Long relationshipId, Long bookmarkId, User user) { | ||
this.id = id; | ||
this.notificationType = notificationType; | ||
this.notificationRead = notificationRead; | ||
this.relationshipId = relationshipId; | ||
this.bookmarkId = bookmarkId; | ||
this.user = user; | ||
} | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/project/linkarchive/backend/notification/enums/NotificationPreference.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 project.linkarchive.backend.notification.enums; | ||
|
||
public enum NotificationPreference { | ||
|
||
ALLOWED, DISALLOWED, MUTE | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/project/linkarchive/backend/notification/enums/NotificationRead.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 project.linkarchive.backend.notification.enums; | ||
|
||
public enum NotificationRead { | ||
|
||
READ, UNREAD | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/project/linkarchive/backend/notification/enums/NotificationType.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 project.linkarchive.backend.notification.enums; | ||
|
||
public enum NotificationType { | ||
|
||
BOOKMARK, RELATIONSHIP | ||
|
||
} |
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
7 changes: 7 additions & 0 deletions
7
src/main/java/project/linkarchive/backend/pin/enums/PinStatus.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 project.linkarchive.backend.pin.enums; | ||
|
||
public enum PinStatus { | ||
|
||
FIXED, UNFIXED | ||
|
||
} |
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