Init Commit
This commit is contained in:
48
Backend/GestorFacturas.API/Models/Evento.cs
Normal file
48
Backend/GestorFacturas.API/Models/Evento.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace GestorFacturas.API.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Entidad para registro de eventos y auditoría del sistema
|
||||
/// </summary>
|
||||
public class Evento
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Fecha y hora del evento
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime Fecha { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Mensaje descriptivo del evento
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string Mensaje { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Tipo de evento: "Info", "Error", "Warning"
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(20)]
|
||||
public string Tipo { get; set; } = "Info";
|
||||
|
||||
/// <summary>
|
||||
/// Indica si este evento ya fue notificado por correo
|
||||
/// </summary>
|
||||
public bool Enviado { get; set; } = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum para tipos de eventos
|
||||
/// </summary>
|
||||
public enum TipoEvento
|
||||
{
|
||||
Info,
|
||||
Error,
|
||||
Warning
|
||||
}
|
||||
Reference in New Issue
Block a user