36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Zentral.Domain.Entities.Training;
|
|
|
|
public enum NotificationStatus
|
|
{
|
|
Pending,
|
|
Approved,
|
|
Sent,
|
|
Error
|
|
}
|
|
|
|
public class TrainingNotification : BaseEntity
|
|
{
|
|
public int? ClienteId { get; set; } // Notifications are grouped by Client (Company)
|
|
public Cliente? Cliente { get; set; }
|
|
|
|
public string RecipientEmail { get; set; } = string.Empty;
|
|
public string Subject { get; set; } = string.Empty;
|
|
public string Body { get; set; } = string.Empty;
|
|
|
|
public DateTime ScheduledDate { get; set; }
|
|
public DateTime? SentDate { get; set; }
|
|
|
|
// JSON array of TrainingRecord IDs included in this notification
|
|
public string IncludedRecordIds { get; set; } = "[]";
|
|
|
|
public NotificationStatus Status { get; set; } = NotificationStatus.Pending;
|
|
public string? ErrorMessage { get; set; }
|
|
|
|
// Optional: Link to specific TrainingRecords if needed for traceability,
|
|
// but if it's a grouped email, maybe just a JSON list or text description in Body is enough.
|
|
// Let's keep it simple for now, the Body will contain the details.
|
|
}
|