diff --git a/LiteCharms.Features.Tests/CommonFixture.cs b/LiteCharms.Features.Tests/CommonFixture.cs index b237b8f..358aaf2 100644 --- a/LiteCharms.Features.Tests/CommonFixture.cs +++ b/LiteCharms.Features.Tests/CommonFixture.cs @@ -1,4 +1,4 @@ -using LiteCharms.Extensions; +using LiteCharms.Features.Extensions; namespace LiteCharms.Features.Tests; diff --git a/LiteCharms.Features/Extensions/Constants.cs b/LiteCharms.Features/Extensions/Constants.cs deleted file mode 100644 index b9d11e1..0000000 --- a/LiteCharms.Features/Extensions/Constants.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace LiteCharms.Features.Extensions; - -public static class Constants -{ -} diff --git a/LiteCharms.Features/Extensions/EntityModeMappers.cs b/LiteCharms.Features/Extensions/EntityModeMappers.cs index 9a1d97a..baeb69c 100644 --- a/LiteCharms.Features/Extensions/EntityModeMappers.cs +++ b/LiteCharms.Features/Extensions/EntityModeMappers.cs @@ -1,29 +1,36 @@ -using LiteCharms.Models; +using LiteCharms.Features.Shop.CartPackages.Models; +using LiteCharms.Features.Shop.Customers.Models; +using LiteCharms.Features.Shop.Leads.Models; +using LiteCharms.Features.Shop.Notifications.Models; +using LiteCharms.Features.Shop.Orders.Models; +using LiteCharms.Features.Shop.Products.Models; +using LiteCharms.Features.Shop.Quotes.Models; +using LiteCharms.Features.Shop.ShoppingCarts.Models; -namespace LiteCharms.Extensions; +namespace LiteCharms.Features.Extensions; public static class EntityModeMappers { - public static ShoppingCartPackage ToModel(this Entities.ShoppingCartPackage entity) => + public static ShoppingCartPackage ToModel(this Shop.ShoppingCarts.Entities.ShoppingCartPackage entity) => new() { Id = entity.Id, CreatedAt = entity.CreatedAt, PackageId = entity.PackageId, - ShoppingCartId = entity.ShoppingCartId + ShoppingCartId = entity.ShoppingCartId }; - public static PackageItem ToModel(this Entities.PackageItem entity) => + public static PackageItem ToModel(this Shop.CartPackages.Entities.PackageItem entity) => new() { Id = entity.Id, Active = entity.Active, CreatedAt = entity.CreatedAt, PackageId = entity.PackageId, - ProductPriceId = entity.ProductPriceId + ProductPriceId = entity.ProductPriceId }; - public static Package ToModel(this Entities.Package entity) => + public static Package ToModel(this Shop.CartPackages.Entities.Package entity) => new() { Id = entity.Id, @@ -31,10 +38,12 @@ public static class EntityModeMappers Active = entity.Active, Description = entity.Description, Name = entity.Name, - UpdatedAt = entity.UpdatedAt + UpdatedAt = entity.UpdatedAt, + ImageUrl = entity.ImageUrl, + Summary = entity.Summary }; - public static ShoppingCartItem ToModel(this Entities.ShoppingCartItem entity) => + public static ShoppingCartItem ToModel(this Shop.ShoppingCarts.Entities.ShoppingCartItem entity) => new() { Id = entity.Id, @@ -42,21 +51,20 @@ public static class EntityModeMappers UpdatedAt = entity.UpdatedAt, ProductPriceId = entity.ProductPriceId, Quantity = entity.Quantity, - ShoppingCartId = entity.ShoppingCartId + ShoppingCartId = entity.ShoppingCartId }; - public static ShoppingCart ToModel(this Entities.ShoppingCart entity) => + public static ShoppingCart ToModel(this Shop.ShoppingCarts.Entities.ShoppingCart entity) => new() { Id = entity.Id, CreatedAt = entity.CreatedAt, UpdatedAt = entity.UpdatedAt, CustomerId = entity.CustomerId, - OrderId = entity.OrderId, - QuoteId = entity.QuoteId + OrderId = entity.OrderId }; - public static Quote ToModel(this Entities.Quote entity) => + public static Quote ToModel(this Shop.Quotes.Entities.Quote entity) => new() { Id = entity.Id, @@ -66,10 +74,12 @@ public static class EntityModeMappers ExpiredAt = entity.ExpiredAt, Reason = entity.Reason, ShoppingCartId = entity.ShoppingCartId, - Status = entity.Status + Status = entity.Status, + InvoiceUrl = entity.InvoiceUrl, + OrderId = entity.OrderId }; - public static Notification ToModel(this Entities.Notification entity) => + public static Notification ToModel(this Shop.Notifications.Entities.Notification entity) => new() { Id = entity.Id, @@ -93,7 +103,7 @@ public static class EntityModeMappers Errors = entity.Errors }; - public static Customer ToModel(this Entities.Customer entity) => + public static Customer ToModel(this Shop.Customers.Entities.Customer entity) => new() { Id = entity.Id, @@ -118,7 +128,7 @@ public static class EntityModeMappers Whatsapp = entity.Whatsapp }; - public static Lead ToModel(this Entities.Lead entity) => + public static Lead ToModel(this Shop.Leads.Entities.Lead entity) => new() { Id = entity.Id, @@ -136,10 +146,10 @@ public static class EntityModeMappers ClickId = entity.ClickId, TargetId = entity.TargetId, WebClickId = entity.WebClickId, - Status = entity.Status + Status = entity.Status }; - public static Order ToModel(this Entities.Order entity) => + public static Order ToModel(this Shop.Orders.Entities.Order entity) => new() { Id = entity.Id, @@ -147,35 +157,35 @@ public static class EntityModeMappers UpdatedAt = entity.UpdatedAt, CustomerId = entity.CustomerId, Notes = entity.Notes, - RefundId = entity.RefundId, - QuoteId = entity.QuoteId, Status = entity.Status, - ShoppingCartId = entity.ShoppingCartId, - DepositRequired = entity.DepositRequired, Requirements = entity.Requirements, - Terms = entity.Terms + Terms = entity.Terms, + InvoiceUrl = entity.InvoiceUrl }; - public static OrderRefund ToModel(this Entities.OrderRefund entity) => + public static OrderRefund ToModel(this Shop.Orders.Entities.OrderRefund entity) => new() { Id = entity.Id, CreatedAt = entity.CreatedAt, OrderId = entity.OrderId, Reason = entity.Reason, - Amount = entity.Amount + Amount = entity.Amount }; - public static Product ToModel(this Entities.Product entity) => + public static Product ToModel(this Shop.Products.Entities.Product entity) => new() { Id = entity.Id, Name = entity.Name, Description = entity.Description, - Active = entity.Active + Active = entity.Active, + Summary = entity.Summary, + ImageUrl = entity.ImageUrl, + Thumbnails = entity.Thumbnails }; - public static ProductPrice ToModel(this Entities.ProductPrice entity) => + public static ProductPrice ToModel(this Shop.Products.Entities.ProductPrice entity) => new() { Id = entity.Id, @@ -184,6 +194,6 @@ public static class EntityModeMappers Active = entity.Active, CreatedAt = entity.CreatedAt, Discount = entity.Discount, - UpdatedAt = entity.UpdatedAt + UpdatedAt = entity.UpdatedAt }; } diff --git a/LiteCharms.Features/Extensions/HealthChecks.cs b/LiteCharms.Features/Extensions/HealthChecks.cs index 01bb1ae..ebabd8f 100644 --- a/LiteCharms.Features/Extensions/HealthChecks.cs +++ b/LiteCharms.Features/Extensions/HealthChecks.cs @@ -1,6 +1,6 @@ -using LiteCharms.Infrastructure.HealthChecks; +using LiteCharms.Features.HealthChecks; -namespace LiteCharms.Extensions; +namespace LiteCharms.Features.Extensions; public static class HealthChecks { diff --git a/LiteCharms.Features/Extensions/Monitoring.cs b/LiteCharms.Features/Extensions/Monitoring.cs index a5b52da..8e5db29 100644 --- a/LiteCharms.Features/Extensions/Monitoring.cs +++ b/LiteCharms.Features/Extensions/Monitoring.cs @@ -1,4 +1,4 @@ -namespace LiteCharms.Extensions; +namespace LiteCharms.Features.Extensions; public static class Monitoring { diff --git a/LiteCharms.Features/Extensions/Postgres.cs b/LiteCharms.Features/Extensions/Postgres.cs index 50c420c..0e70287 100644 --- a/LiteCharms.Features/Extensions/Postgres.cs +++ b/LiteCharms.Features/Extensions/Postgres.cs @@ -1,6 +1,6 @@ -using LiteCharms.Infrastructure.Database; +using LiteCharms.Features.Shop.Postgres; -namespace LiteCharms.Extensions; +namespace LiteCharms.Features.Extensions; public static class Postgres { diff --git a/LiteCharms.Features/Extensions/Quartz.cs b/LiteCharms.Features/Extensions/Quartz.cs index a92d462..e22b1ca 100644 --- a/LiteCharms.Features/Extensions/Quartz.cs +++ b/LiteCharms.Features/Extensions/Quartz.cs @@ -1,7 +1,7 @@ -using LiteCharms.Abstractions; -using LiteCharms.Infrastructure.Quartz; +using LiteCharms.Features.Quartz; +using LiteCharms.Features.Quartz.Abstractions; -namespace LiteCharms.Extensions; +namespace LiteCharms.Features.Extensions; public static class Quartz { diff --git a/LiteCharms.Features/Extensions/ServiceBus.cs b/LiteCharms.Features/Extensions/ServiceBus.cs index ab8d7c0..3a57832 100644 --- a/LiteCharms.Features/Extensions/ServiceBus.cs +++ b/LiteCharms.Features/Extensions/ServiceBus.cs @@ -1,9 +1,9 @@ -using LiteCharms.Abstractions; -using LiteCharms.Infrastructure.ServiceBus; -using LiteCharms.Infrastructure.ServiceBus.Exchanges; -using LiteCharms.Infrastructure.ServiceBus.Queues; +using LiteCharms.Features.ServiceBus; +using LiteCharms.Features.ServiceBus.Abstractions; +using LiteCharms.Features.ServiceBus.Exchanges; +using LiteCharms.Features.ServiceBus.Queues; -namespace LiteCharms.Extensions; +namespace LiteCharms.Features.Extensions; public static class ServiceBus { diff --git a/LiteCharms.Features/LiteCharms.Features.csproj b/LiteCharms.Features/LiteCharms.Features.csproj index 3d6552b..9ad7508 100644 --- a/LiteCharms.Features/LiteCharms.Features.csproj +++ b/LiteCharms.Features/LiteCharms.Features.csproj @@ -130,6 +130,7 @@ +