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/Connected.Common.Types.Model/TaxRates/ITaxRate.cs

36 lines
1.2 KiB

using Connected.Data;
namespace Connected.Common.Types.TaxRates;
/// <summary>
/// Represents an entity which contains information about tax rate.
/// </summary>
/// <remarks>
/// Every Tax system has one or more tax rates, for example one tax rate is for
/// products and the other is for servies. This entity enables the environment
/// to manage different tax rates.
/// </remarks>
public interface ITaxRate : IPrimaryKey<int>
{
/// <summary>
/// The name of the tax rate.
/// </summary>
/// <remarks>
/// Define this value as descriptive as possible so users can
/// quickly recognize whyt kind of tax rate defines each record.
/// </remarks>
string? Name { get; init; }
/// <summary>
/// The rate or value of the tax rate. Should be a positive number.
/// </summary>
/// <remarks>
/// Avoid updating this value. Create a new <see cref="ITaxRate"/> entity instead
/// and disable the previous entity by setting its <see cref="Status"/> value to <see cref="Status.Disabled"/>.
/// </remarks>
float Rate { get; init; }
/// <summary>
/// The status of tax rate. Tax rates that are not used in the environment should be marked
/// as <see cref="Status.Disabled"/> so users can use only valid records.
/// </summary>
Status Status { get; init; }
}