diff options
Diffstat (limited to 'RhSolutions.SkuParser.Api/Models/Product.cs')
-rw-r--r-- | RhSolutions.SkuParser.Api/Models/Product.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/RhSolutions.SkuParser.Api/Models/Product.cs b/RhSolutions.SkuParser.Api/Models/Product.cs index 26a7392..6aba7f0 100644 --- a/RhSolutions.SkuParser.Api/Models/Product.cs +++ b/RhSolutions.SkuParser.Api/Models/Product.cs @@ -4,6 +4,10 @@ namespace RhSolutions.SkuParser.Models; public record Product
{
+ private string _sku = string.Empty;
+ private const string _parsePattern = @"(?<Lead>[1\s]|^|\b)(?<Article>\d{6})(?<Delimiter>[\s13-])(?<Variant>\d{3})(\b|$)";
+ private const string _validnessPattern = @"^1\d{6}[1|3]\d{3}$";
+
/// <summary>
/// Артикул РЕХАУ в заданном формате
/// </summary>
@@ -17,9 +21,9 @@ public record Product : throw new ArgumentException("$Неверный артикул: {value}");
}
}
- private string _sku = string.Empty;
- private const string _parsePattern = @"(?<Lead>[1\s]|^|\b)(?<Article>\d{6})(?<Delimiter>[\s13-])(?<Variant>\d{3})(\b|$)";
- private const string _validnessPattern = @"^1\d{6}[1|3]\d{3}$";
+ public ProductLine? ProductLine { get; set; }
+ public string? Name { get; set; }
+ public decimal? Price { get; set; }
private static bool IsValudSku(string value)
{
@@ -62,4 +66,4 @@ public record Product }
public override int GetHashCode() => Sku.GetHashCode();
public override string ToString() => Sku;
-}
\ No newline at end of file +}
|