namespace PowderCoating.Core.Entities;
///
/// 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.
///
public class ManufacturerLookupPattern : BaseEntity
{
/// Display / match name (case-insensitive contains check).
public string ManufacturerName { get; set; } = string.Empty;
///
/// 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.
///
public string? ProductUrlTemplate { get; set; }
/// How the color name is turned into a URL slug.
public string SlugTransform { get; set; } = "LowerHyphen"; // LowerHyphen | LowerUnderscore | TitleHyphen | AsIs
///
/// Manufacturer/retailer domain (e.g. "prismaticpowders.com").
/// Used by the search result URL picker even when no template is configured.
///
public string? Domain { get; set; }
public bool IsActive { get; set; } = true;
public string? Notes { get; set; }
}