< Summary

Information
Class: FAU.Logica.DTOs.ActualizarFictoPersonaRequest
Assembly: FAU.Logica
File(s): /home/runner/work/Sistema.Liquidacion.BE/Sistema.Liquidacion.BE/FAU.Logica/DTOs/FictoPersonaDtos.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 124
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Importe()100%11100%
get_Observaciones()100%11100%

File(s)

/home/runner/work/Sistema.Liquidacion.BE/Sistema.Liquidacion.BE/FAU.Logica/DTOs/FictoPersonaDtos.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2
 3namespace FAU.Logica.DTOs;
 4
 5public static class TiposFicto
 6{
 7    public const string Comedor = "comedor";
 8    public const string Guarderia = "guarderia";
 9    public const string Ticket = "ticket";
 10
 11    public static readonly IReadOnlySet<string> Todos =
 12        new HashSet<string>(StringComparer.OrdinalIgnoreCase)
 13        {
 14            Comedor,
 15            Guarderia,
 16            Ticket
 17        };
 18
 19    public static readonly IReadOnlySet<string> Importables =
 20        new HashSet<string>(StringComparer.OrdinalIgnoreCase)
 21        {
 22            Comedor,
 23            Guarderia
 24        };
 25}
 26
 27public class FictoPersonaDto
 28{
 29    public long Id { get; set; }
 30    public long PersonaId { get; set; }
 31    public string Cedula { get; set; } = string.Empty;
 32    public string NombreCompleto { get; set; } = string.Empty;
 33    public string Tipo { get; set; } = string.Empty;
 34    public decimal Importe { get; set; }
 35    public bool Activo { get; set; }
 36    public string AcreedorCodigo { get; set; } = string.Empty;
 37    public string AcreedorNombre { get; set; } = string.Empty;
 38    public string? Observaciones { get; set; }
 39    public DateTime FechaCreacion { get; set; }
 40    public DateTime? FechaModificacion { get; set; }
 41    public DateTime? FechaBaja { get; set; }
 42}
 43
 44public class CrearFictoPersonaRequest
 45{
 46    [Required]
 47    [MaxLength(12)]
 48    public string CedulaTitular { get; set; } = string.Empty;
 49
 50    [Required]
 51    [MaxLength(20)]
 52    public string Tipo { get; set; } = string.Empty;
 53
 54    [Range(0.01, 999999999999.99)]
 55    public decimal Importe { get; set; }
 56
 57    [MaxLength(500)]
 58    public string? Observaciones { get; set; }
 59}
 60
 61public class ActualizarFictoPersonaRequest
 62{
 63    [Range(0.01, 999999999999.99)]
 564    public decimal Importe { get; set; }
 65
 66    [MaxLength(500)]
 267    public string? Observaciones { get; set; }
 68}
 69
 70public class FilaImportacionFictoRequest
 71{
 72    [Required]
 73    [MaxLength(20)]
 74    public string Tipo { get; set; } = string.Empty;
 75
 76    [Range(2, 10000)]
 77    public int NumeroFila { get; set; }
 78
 79    [Required]
 80    [MaxLength(12)]
 81    public string Cedula { get; set; } = string.Empty;
 82
 83    [Range(0.01, 999999999999.99)]
 84    public decimal Importe { get; set; }
 85}
 86
 87public class ImportarFictosRequest
 88{
 89    [Required]
 90    [MaxLength(255)]
 91    public string NombreArchivo { get; set; } = string.Empty;
 92
 93    [MaxLength(64)]
 94    public string? HashArchivo { get; set; }
 95
 96    [Required]
 97    [MinLength(1)]
 98    [MaxLength(20000)]
 99    public List<FilaImportacionFictoRequest> Filas { get; set; } = [];
 100}
 101
 102public class ErrorImportacionFictoDto
 103{
 104    public string Tipo { get; set; } = string.Empty;
 105    public int NumeroFila { get; set; }
 106    public string Cedula { get; set; } = string.Empty;
 107    public string Mensaje { get; set; } = string.Empty;
 108}
 109
 110public class ResultadoValidacionImportacionFictosDto
 111{
 112    public bool EsValido => Errores.Count == 0;
 113    public int TotalFilas { get; set; }
 114    public int Nuevos { get; set; }
 115    public int Actualizados { get; set; }
 116    public int Reactivados { get; set; }
 117    public int SinCambios { get; set; }
 118    public List<ErrorImportacionFictoDto> Errores { get; set; } = [];
 119}
 120
 121public class ResultadoImportacionFictosDto : ResultadoValidacionImportacionFictosDto
 122{
 123    public bool Aplicado { get; set; }
 124}

Methods/Properties

get_Importe()
get_Observaciones()