0
0

Add black pipe Query Modifier

This commit is contained in:
Serghei Cebotari 2023-09-29 16:25:28 +03:00
parent 799b3f40a2
commit b369384931
2 changed files with 15 additions and 1 deletions

View File

@ -4,7 +4,19 @@ using Microsoft.AspNetCore.Http.Extensions;
namespace RhSolutions.Api.Services namespace RhSolutions.Api.Services
{ {
public class FlexPipeQueryModifier : IProductQueryModifier public class BlackPipeQueryModifier : FlexPipeQueryModifier
{
protected override string diameterPattern => @"16|20|25";
protected override string pipeName => "Black";
protected override Dictionary<string, string> diameterNames => new()
{
["16"] = "16х2,2",
["20"] = "20х2,8",
["25"] = "25х3,5"
};
}
public class FlexPipeQueryModifier : IProductQueryModifier
{ {
protected virtual string diameterPattern { get; } = @"16|20|25|32|40|50|63"; protected virtual string diameterPattern { get; } = @"16|20|25|32|40|50|63";
protected virtual string typePattern { get; } = @"(бухт)|(отр)"; protected virtual string typePattern { get; } = @"(бухт)|(отр)";

View File

@ -14,6 +14,8 @@ public class ProductQueryModifierFactory
return new FlexPipeQueryModifier(); return new FlexPipeQueryModifier();
case "Stabil": case "Stabil":
return new StabilPipeQueryModifier(); return new StabilPipeQueryModifier();
case "Black":
return new BlackPipeQueryModifier();
default: default:
return new BypassQueryModifier(); return new BypassQueryModifier();
} }