Implemented category feature
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user