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/TaxRates/TaxRate.cs

34 lines
950 B

using Connected.Data;
using Connected.Entities.Annotations;
using Connected.Entities.Concurrency;
namespace Common.Types.TaxRates;
/// <summary>
/// The <see cref="ITaxRate"/> entity.
/// </summary>
[Table(Schema = SchemaAttribute.TypesSchema)]
internal sealed record TaxRate : ConcurrentEntity<int>, ITaxRate
{
/// <summary>
/// The cache key under which all TaxRate entities are stored.
/// </summary>
public const string CacheKey = $"{SchemaAttribute.TypesSchema}.{nameof(TaxRate)}";
/// <summary>
/// The name of the <see cref="ITaxRate"/>.
/// </summary>
[Length(128)]
public string? Name { get; init; }
/// <summary>
/// The rate of the <see cref="ITaxRate"/>.
/// </summary>
public float Rate { get; init; }
/// <summary>
/// The <see cref="ITaxRate"/> status. Only <see cref="Status.Enabled"/> entities
/// should be used on front ends.
/// </summary>
[Default(Status.Enabled)]
public Status Status { get; init; }
}