Files
PowderCoatingLogix/src/PowderCoating.Core/Entities/ManufacturerLookupPattern.cs
T
2026-04-23 21:38:24 -04:00

35 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace PowderCoating.Core.Entities;
/// <summary>
/// Stores per-manufacturer URL patterns so the AI lookup service can build
/// direct product page URLs rather than relying solely on search results.
/// These records are global (CompanyId = 0) and shared across all tenants.
/// </summary>
public class ManufacturerLookupPattern : BaseEntity
{
/// <summary>Display / match name (case-insensitive contains check).</summary>
public string ManufacturerName { get; set; } = string.Empty;
/// <summary>
/// URL template. Supported placeholders:
/// {partNumber} manufacturer part number (slashes normalized to hyphens)
/// {slug} color name transformed by SlugTransform
/// {colorCode} color code as-is
/// If a required placeholder is missing at runtime the template is skipped and
/// the system falls back to a Serper search URL.
/// </summary>
public string? ProductUrlTemplate { get; set; }
/// <summary>How the color name is turned into a URL slug.</summary>
public string SlugTransform { get; set; } = "LowerHyphen"; // LowerHyphen | LowerUnderscore | TitleHyphen | AsIs
/// <summary>
/// Manufacturer/retailer domain (e.g. "prismaticpowders.com").
/// Used by the search result URL picker even when no template is configured.
/// </summary>
public string? Domain { get; set; }
public bool IsActive { get; set; } = true;
public string? Notes { get; set; }
}