This commit is contained in:
2026-04-22 21:26:23 +04:30
parent 64ee78e320
commit 15d11122b8
9 changed files with 149 additions and 229 deletions
@@ -29,14 +29,13 @@ public class Category : Entity<CategoryId>
DescriptionVO description,
CategoryImage image,
CategoryPath path,
CategoryId? parentId = null,
CategoryPath? parentPath = null)
CategoryId? parentId = null)
{
_title = title;
_description = description;
_image = image;
_parentId = parentId;
//_path = CategoryPath.CreatePath(parentPath, ;
_path = path;
}
@@ -44,10 +43,9 @@ public class Category : Entity<CategoryId>
DescriptionVO description,
CategoryImage image,
CategoryPath path,
CategoryId? parentId = null,
CategoryPath? parentPath = null)
CategoryId? parentId = null)
{
return new Category(title, description, image, path, parentId, parentPath);
return new Category(title, description, image, path, parentId);
}
public TitleVO Title => _title;
@@ -17,4 +17,10 @@ public class CategoryImage : ValueObject
=> new CategoryImage(value);
public string Value { get; init; }
public static implicit operator CategoryImage?(string? value)
=> string.IsNullOrWhiteSpace(value) ? null : new(value);
public static implicit operator string(CategoryImage value)
=> value.Value;
}