This repository has been archived by the owner on Jun 25, 2022. It is now read-only.
-
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(back-end): Implement notification logic
Add models, repository, controller, hub and migration to implement the logic of notifications
- Loading branch information
1 parent
d02d851
commit 58b6651
Showing
14 changed files
with
4,029 additions
and
169 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using System.ComponentModel.DataAnnotations.Schema; | ||
|
||
namespace Kaizen.Domain.Entities | ||
{ | ||
public enum NotificationState | ||
{ | ||
Pending, | ||
View | ||
} | ||
|
||
public class Notification | ||
{ | ||
[Key] | ||
public int Id { get; set; } | ||
|
||
public string Title { get; set; } | ||
public string Message { get; set; } | ||
public string Icon { get; set; } | ||
|
||
public NotificationState State { get; set; } = NotificationState.Pending; | ||
|
||
[ForeignKey("UserId")] | ||
public ApplicationUser User { get; set; } | ||
|
||
public string UserId { get; set; } | ||
} | ||
} |
Oops, something went wrong.