namespace CartWise.Domain.Entities;

public class Brand
{
    public Guid BrandId { get; private set; }

    public string Name { get; private set; } = null!;

    public string NormalizedName { get; private set; } = null!;

    private Brand()
    {
    }

    public Brand(string name)
    {
        if (string.IsNullOrWhiteSpace(name))
        {
            throw new ArgumentException("Brand name is required.", nameof(name));
        }

        BrandId = Guid.NewGuid();
        Name = name.Trim();
        NormalizedName = Name.ToUpperInvariant();
    }
}
