22 lines
710 B
C#
22 lines
710 B
C#
|
|
using System.ComponentModel.DataAnnotations;
|
||
|
|
|
||
|
|
namespace GestionIntegral.Api.Dtos.Suscripciones
|
||
|
|
{
|
||
|
|
public class CreateAjusteDto
|
||
|
|
{
|
||
|
|
[Required]
|
||
|
|
public int IdSuscriptor { get; set; }
|
||
|
|
|
||
|
|
[Required]
|
||
|
|
[RegularExpression("^(Credito|Debito)$", ErrorMessage = "El tipo de ajuste debe ser 'Credito' o 'Debito'.")]
|
||
|
|
public string TipoAjuste { get; set; } = string.Empty;
|
||
|
|
|
||
|
|
[Required]
|
||
|
|
[Range(0.01, 999999.99, ErrorMessage = "El monto debe ser un valor positivo.")]
|
||
|
|
public decimal Monto { get; set; }
|
||
|
|
|
||
|
|
[Required(ErrorMessage = "El motivo es obligatorio.")]
|
||
|
|
[StringLength(250)]
|
||
|
|
public string Motivo { get; set; } = string.Empty;
|
||
|
|
}
|
||
|
|
}
|