Init Commit
This commit is contained in:
95
Backend/GestorFacturas.API/Models/DTOs/ConfiguracionDto.cs
Normal file
95
Backend/GestorFacturas.API/Models/DTOs/ConfiguracionDto.cs
Normal file
@@ -0,0 +1,95 @@
|
||||
namespace GestorFacturas.API.Models.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// DTO para transferencia de datos de configuración
|
||||
/// </summary>
|
||||
public class ConfiguracionDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
// Periodicidad
|
||||
public string Periodicidad { get; set; } = "Dias";
|
||||
public int ValorPeriodicidad { get; set; } = 1;
|
||||
public string HoraEjecucion { get; set; } = "00:00:00";
|
||||
public DateTime? UltimaEjecucion { get; set; }
|
||||
public DateTime? ProximaEjecucion { get; set; }
|
||||
public bool Estado { get; set; }
|
||||
public bool EnEjecucion { get; set; }
|
||||
|
||||
// Base de Datos Externa
|
||||
public string DBServidor { get; set; } = "127.0.0.1";
|
||||
public string DBNombre { get; set; } = string.Empty;
|
||||
public string? DBUsuario { get; set; }
|
||||
public string? DBClave { get; set; }
|
||||
public bool DBTrusted { get; set; } = true;
|
||||
|
||||
// Rutas
|
||||
public string RutaFacturas { get; set; } = string.Empty;
|
||||
public string RutaDestino { get; set; } = string.Empty;
|
||||
|
||||
// SMTP
|
||||
public string? SMTPServidor { get; set; }
|
||||
public int SMTPPuerto { get; set; } = 587;
|
||||
public string? SMTPUsuario { get; set; }
|
||||
public string? SMTPClave { get; set; }
|
||||
public bool SMTPSSL { get; set; } = true;
|
||||
public string? SMTPDestinatario { get; set; }
|
||||
public bool AvisoMail { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DTO para probar conexión a base de datos externa
|
||||
/// </summary>
|
||||
public class ProbarConexionDto
|
||||
{
|
||||
public string Servidor { get; set; } = string.Empty;
|
||||
public string NombreDB { get; set; } = string.Empty;
|
||||
public string? Usuario { get; set; }
|
||||
public string? Clave { get; set; }
|
||||
public bool TrustedConnection { get; set; } = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DTO para probar configuración SMTP
|
||||
/// </summary>
|
||||
public class ProbarSMTPDto
|
||||
{
|
||||
public string Servidor { get; set; } = string.Empty;
|
||||
public int Puerto { get; set; } = 587;
|
||||
public string Usuario { get; set; } = string.Empty;
|
||||
public string Clave { get; set; } = string.Empty;
|
||||
public bool SSL { get; set; } = true;
|
||||
public string Destinatario { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DTO para solicitud de ejecución manual
|
||||
/// </summary>
|
||||
public class EjecucionManualDto
|
||||
{
|
||||
public DateTime FechaDesde { get; set; } = DateTime.Today;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DTO para respuesta de evento
|
||||
/// </summary>
|
||||
public class EventoDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public DateTime Fecha { get; set; }
|
||||
public string Mensaje { get; set; } = string.Empty;
|
||||
public string Tipo { get; set; } = string.Empty;
|
||||
public bool Enviado { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DTO para respuesta paginada
|
||||
/// </summary>
|
||||
public class PagedResult<T>
|
||||
{
|
||||
public List<T> Items { get; set; } = new();
|
||||
public int TotalCount { get; set; }
|
||||
public int PageNumber { get; set; }
|
||||
public int PageSize { get; set; }
|
||||
public int TotalPages => (int)Math.Ceiling((double)TotalCount / PageSize);
|
||||
}
|
||||
Reference in New Issue
Block a user