80% Готово

This commit is contained in:
2025-03-27 06:55:34 +04:00
parent d3bf4eec43
commit e1e8d23bd0
25 changed files with 2080 additions and 229 deletions

View File

@@ -6,10 +6,20 @@ namespace SmallSoftwareContracts.DataModels;
public class InstallationRequestDataModel(string softwareId, string requestId, int count, double price) : IValidation
{
private readonly SoftwareDataModel? _software;
public string SoftwareId { get; private set; } = softwareId;
public string RequestId { get; private set; } = requestId;
public int Count { get; private set; } = count;
public double Price { get; private set; } = price;
public string SoftwareName => _software?.SoftwareName ?? string.Empty;
public InstallationRequestDataModel(string saleId, string softwareId, int count, double price, SoftwareDataModel software) : this(saleId, softwareId, count, price)
{
_software = software;
}
public void Validate()
{
if (SoftwareId.IsEmpty())