Added package management

This commit is contained in:
Khwezi Mngoma
2026-05-10 14:18:56 +02:00
parent 32d1019eb5
commit 394429677e
29 changed files with 765 additions and 35 deletions
+42 -4
View File
@@ -4,6 +4,36 @@ namespace LiteCharms.Extensions;
public static class EntityModeMappers
{
public static ShoppingCartPackage ToModel(this Entities.ShoppingCartPackage entity) =>
new()
{
Id = entity.Id,
CreatedAt = entity.CreatedAt,
PackageId = entity.PackageId,
ShoppingCartId = entity.ShoppingCartId
};
public static PackageItem ToModel(this Entities.PackageItem entity) =>
new()
{
Id = entity.Id,
Active = entity.Active,
CreatedAt = entity.CreatedAt,
PackageId = entity.PackageId,
ProductPriceId = entity.ProductPriceId
};
public static Package ToModel(this Entities.Package entity) =>
new()
{
Id = entity.Id,
CreatedAt = entity.CreatedAt,
Active = entity.Active,
Description = entity.Description,
Name = entity.Name,
UpdatedAt = entity.UpdatedAt
};
public static ShoppingCartItem ToModel(this Entities.ShoppingCartItem entity) =>
new()
{
@@ -36,7 +66,7 @@ public static class EntityModeMappers
ExpiredAt = entity.ExpiredAt,
Reason = entity.Reason,
ShoppingCartId = entity.ShoppingCartId,
Status = entity.Status
Status = entity.Status
};
public static Notification ToModel(this Entities.Notification entity) =>
@@ -53,7 +83,12 @@ public static class EntityModeMappers
Platform = entity.Platform,
Recipient = entity.Recipient,
Subject = entity.Subject,
Processed = entity.Processed
Processed = entity.Processed,
SenderName = entity.SenderName,
RecipientAddress = entity.RecipientAddress,
Priority = entity.Priority,
UpdatedAt = entity?.UpdatedAt,
IsHtml = entity!.IsHtml
};
public static Customer ToModel(this Entities.Customer entity) =>
@@ -78,7 +113,7 @@ public static class EntityModeMappers
Slack = entity.Slack,
Tax = entity.Tax,
Website = entity.Website,
Whatsapp = entity.Whatsapp
Whatsapp = entity.Whatsapp
};
public static Lead ToModel(this Entities.Lead entity) =>
@@ -113,7 +148,10 @@ public static class EntityModeMappers
RefundId = entity.RefundId,
QuoteId = entity.QuoteId,
Status = entity.Status,
ShoppingCartId = entity.ShoppingCartId
ShoppingCartId = entity.ShoppingCartId,
DepositRequired = entity.DepositRequired,
Requirements = entity.Requirements,
Terms = entity.Terms
};
public static OrderRefund ToModel(this Entities.OrderRefund entity) =>