feat: implement training notification management and new training pages

This commit is contained in:
2025-12-13 23:51:03 +01:00
parent 99ce5e1e6a
commit 34f954f494
21 changed files with 6125 additions and 4 deletions

View File

@@ -0,0 +1,35 @@
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.
}