You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Connected.Common.Types/Common.Types.Model/TaxRates/TaxRateArgs.cs

46 lines
1.1 KiB

2 years ago
using Connected.Annotations;
using Connected.ServiceModel;
using System.ComponentModel.DataAnnotations;
namespace Common.Types.TaxRates;
/// <summary>
/// The arguments class for <see cref="ITaxRateService"/> methods.
/// </summary>
public class TaxRateArgs : Dto
{
/// <summary>
/// The <see cref="ITaxRate"/> name.
/// </summary>
/// <remarks>
/// This is a required property with its max length of 128 characters.
/// </remarks>
[Required]
[MaxLength(128)]
public string? Name { get; set; }
/// <summary>
/// The <see cref="ITaxRate"/> rate.
/// </summary>
/// <remarks>
/// This is a required property with it min value of 0.
/// </remarks>
[MinValue(0)]
public float Rate { get; set; }
}
/// <summary>
/// The arguments used when inserting a new <see cref="ITaxRate"/> entity.
/// This is only a markup class serving primary for validation distinction.
/// </summary>
public sealed class InsertTaxRateArgs : TaxRateArgs
{
}
/// <summary>
/// The arguments class used when updating <see cref="ITaxRate"/> entity.
/// </summary>
public class UpdateTaxRateArgs : TaxRateArgs
{
[MinValue(0)]
public int Id { get; set; }
}