using System.ComponentModel.DataAnnotations;

namespace JobsMedical.Web.Models;

/// <summary>An in-app notification for a user (e.g. a new shift/job matching their preferences).
/// Reliable in Iran regardless of Web Push/FCM; a push can ride on top of the same records.</summary>
public class Notification
{
    public long Id { get; set; }

    public int UserId { get; set; }
    public User User { get; set; } = null!;

    [Required, MaxLength(200)] public string Title { get; set; } = "";
    [MaxLength(500)] public string? Body { get; set; }
    [MaxLength(300)] public string? Url { get; set; }

    public bool IsRead { get; set; }
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
