namespace NetinaShop.Domain.Entities.ProductCategories;
[AdaptTwoWays("[name]LDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)]
[AdaptTo("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Projection)]
[GenerateMapper]
public partial class ProductCategory : ApiEntity
{
    public ProductCategory()
    {
        
    }

    public ProductCategory(string name, string description,bool isMain)
    {
        Name = name;
        Description = description;
        IsMain = isMain;
    }
    public string Name { get; internal set; } = string.Empty;
    public string Description { get; internal set; } = string.Empty;
    public bool IsMain { get; set; }

    public Guid? ParentId { get; internal set; }
    public ProductCategory? Parent { get; internal set; }

    //public List<ProductCategory> Children { get; internal set; } = new();
    public List<Product> Products { get; internal set; } = new();
    public List<ProductCategoryStorageFile> Files { get; internal set; } = new();
}