Implemented category feature

This commit is contained in:
Khwezi Mngoma
2026-05-30 14:22:00 +02:00
parent 2db3b3d293
commit e40c958066
11 changed files with 1284 additions and 7 deletions
@@ -1,5 +1,6 @@
using LiteCharms.Features.MidrandBooks.AuthorBooks.Models;
using LiteCharms.Features.MidrandBooks.Authors.Models;
using LiteCharms.Features.MidrandBooks.Categories.Models;
using LiteCharms.Features.MidrandBooks.Customers.Models;
using LiteCharms.Features.MidrandBooks.Orders.Models;
using LiteCharms.Features.MidrandBooks.Pages.Models;
@@ -9,6 +10,14 @@ namespace LiteCharms.Features.MidrandBooks.Extensions;
public static class Mappers
{
public static Category ToModel(this Categories.Entities.Category entity) => new()
{
Id = entity.Id,
Name = entity.Name,
IsMain = entity.IsMain,
Enabled = entity.Enabled,
};
public static ShippingProvider ToModel(this Orders.Entities.ShippingProvider entity) => new()
{
Id = entity.Id,
@@ -65,7 +74,7 @@ public static class Mappers
SocialMedia = entiry.SocialMedia,
UpdatedAt = entiry.UpdatedAt,
VatNumber = entiry.VatNumber,
Website = entiry.Website
Website = entiry.Website
};
public static Address ToModel(this Customers.Entities.Address entity) => new()
@@ -83,7 +92,7 @@ public static class Mappers
Street = entity.Street,
City = entity.City,
State = entity.State,
Country = entity.Country
Country = entity.Country
};
public static Contact ToModel(this Customers.Entities.Contact entity) => new()
@@ -112,7 +121,7 @@ public static class Mappers
Enabled = entity.Enabled,
Notes = entity.Notes,
References = entity.References,
Type = entity.Type
Type = entity.Type
};
public static AuthorBook ToModel(this AuthorBooks.Entities.AuthorBook entity) => new()