namespace PowderCoating.Core.Entities; /// /// Platform-wide announcements shown as dismissible banners to company users. /// Not a BaseEntity — SuperAdmin-managed, not per-tenant. /// public class Announcement { public int Id { get; set; } public string Title { get; set; } = string.Empty; public string Message { get; set; } = string.Empty; /// info | success | warning | danger public string Type { get; set; } = "info"; /// All | Plan | Company public string Target { get; set; } = "All"; /// Populated when Target == "Plan" (matches Company.SubscriptionPlan int) public int? TargetPlan { get; set; } /// Populated when Target == "Company" public int? TargetCompanyId { get; set; } public DateTime StartsAt { get; set; } = DateTime.UtcNow; public DateTime? ExpiresAt { get; set; } public bool IsDismissible { get; set; } = true; public bool IsActive { get; set; } = true; public string CreatedByUserId { get; set; } = string.Empty; public string CreatedByUserName { get; set; } = string.Empty; public DateTime CreatedAt { get; set; } = DateTime.UtcNow; public DateTime? UpdatedAt { get; set; } public virtual ICollection Dismissals { get; set; } = new List(); } /// /// Records that a specific user has dismissed a specific announcement. /// public class AnnouncementDismissal { public int Id { get; set; } public int AnnouncementId { get; set; } public string UserId { get; set; } = string.Empty; public DateTime DismissedAt { get; set; } = DateTime.UtcNow; public virtual Announcement Announcement { get; set; } = null!; }