Added product categories
continuous-integration/drone/pr Build is passing

This commit is contained in:
Khwezi Mngoma
2026-05-30 15:35:35 +02:00
parent e40c958066
commit 18d1640808
16 changed files with 1318 additions and 39 deletions
@@ -147,25 +147,21 @@ public static class Mappers
Enabled = entity.Enabled
};
public static Product ToModel(this Products.Entities.Product entity)
public static Product ToModel(this Products.Entities.Product entity) => new Product
{
return new Product
{
Id = entity.Id,
CreatedAt = entity.CreatedAt,
UpdatedAt = entity.UpdatedAt,
Name = entity.Name,
Summary = entity.Summary,
Description = entity.Description,
Type = entity.Type,
ImageUrl = entity.ImageUrl,
ThumbnailUrls = entity.ThumbnailUrls,
Metadata = entity.Metadata,
Categories = entity.Categories,
Enabled = entity.Enabled,
Price = entity.Prices?.FirstOrDefault(p => p.Enabled)?.ToModel() ?? null,
};
}
Id = entity.Id,
CreatedAt = entity.CreatedAt,
UpdatedAt = entity.UpdatedAt,
Name = entity.Name,
Summary = entity.Summary,
Description = entity.Description,
Type = entity.Type,
ImageUrl = entity.ImageUrl,
ThumbnailUrls = entity.ThumbnailUrls,
Metadata = entity.Metadata,
Enabled = entity.Enabled,
Price = entity.Prices?.FirstOrDefault(p => p.Enabled)?.ToModel() ?? null,
};
public static Author ToModel(this Authors.Entities.Author entity) => new()
{