first commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Fitness_core_BE.Models
|
||||
{
|
||||
// A persisted, in-app history of pushes sent to a customer (workout/meal plan assigned,
|
||||
// a gym feed post, etc.) — backs the mobile Notification tab, independent of whether the
|
||||
// device actually received/displayed the push itself.
|
||||
public class CustomerNotification
|
||||
{
|
||||
[Key]
|
||||
public Guid CustomerNotificationId { get; set; }
|
||||
|
||||
public Guid FKCustomerId { get; set; }
|
||||
[ForeignKey("FKCustomerId")]
|
||||
public virtual Customer? Customer { get; set; }
|
||||
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Body { get; set; } = string.Empty;
|
||||
|
||||
// "WorkoutPlanAssigned" | "MealPlanAssigned" | "FeedPost" — free text, not an enum, so
|
||||
// new notification kinds don't need a migration.
|
||||
public string NotificationType { get; set; } = string.Empty;
|
||||
|
||||
// Mirrors PushNavigationData's contract in the mobile app's pushNotification.ts, so a
|
||||
// tap on this notification in the list can navigate the same way a live push would.
|
||||
public string? RouteName { get; set; }
|
||||
public string? RouteParamsJson { get; set; }
|
||||
|
||||
public bool IsRead { get; set; } = false;
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user