предварительно

This commit is contained in:
2025-03-26 15:56:11 +04:00
parent 39dada6bca
commit 0a00160b2f

View File

@@ -9,11 +9,11 @@ using System.Threading.Tasks;
namespace MagicCarpetContracts.DataModels;
public class SaleTourDataModel(string saleId, string cocktailId, int count) : IValidation
public class SaleTourDataModel(string saleId, string tourId, int count) : IValidation
{
public string SaleId { get; private set; } = saleId;
public string TourId { get; private set; } = cocktailId;
public string TourId { get; private set; } = tourId;
public int Count { get; private set; } = count;
@@ -26,10 +26,10 @@ public class SaleTourDataModel(string saleId, string cocktailId, int count) : IV
throw new ValidationException("The value in the field SaleId is not a unique identifier");
if (TourId.IsEmpty())
throw new ValidationException("Field TourId is empty");
throw new ValidationException("Field ProductId is empty");
if (!TourId.IsGuid())
throw new ValidationException("The value in the field TourId is not a unique identifier");
throw new ValidationException("The value in the field ProductId is not a unique identifier");
if (Count <= 0)
throw new ValidationException("Field Count is less than or equal to 0");