2022-12-07 14:07:40 +01:00

34 lines
950 B
C#

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; }
}