emailjobs #18

Merged
khwezi merged 5 commits from emailjobs into master 2026-05-14 02:49:35 +02:00
9 changed files with 56 additions and 50 deletions
Showing only changes of commit 42001998d6 - Show all commits
+1 -1
View File
@@ -1,4 +1,4 @@
using LiteCharms.Extensions; using LiteCharms.Features.Extensions;
namespace LiteCharms.Features.Tests; namespace LiteCharms.Features.Tests;
@@ -1,5 +0,0 @@
namespace LiteCharms.Features.Extensions;
public static class Constants
{
}
@@ -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 class EntityModeMappers
{ {
public static ShoppingCartPackage ToModel(this Entities.ShoppingCartPackage entity) => public static ShoppingCartPackage ToModel(this Shop.ShoppingCarts.Entities.ShoppingCartPackage entity) =>
new() new()
{ {
Id = entity.Id, Id = entity.Id,
CreatedAt = entity.CreatedAt, CreatedAt = entity.CreatedAt,
PackageId = entity.PackageId, 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() new()
{ {
Id = entity.Id, Id = entity.Id,
Active = entity.Active, Active = entity.Active,
CreatedAt = entity.CreatedAt, CreatedAt = entity.CreatedAt,
PackageId = entity.PackageId, 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() new()
{ {
Id = entity.Id, Id = entity.Id,
@@ -31,10 +38,12 @@ public static class EntityModeMappers
Active = entity.Active, Active = entity.Active,
Description = entity.Description, Description = entity.Description,
Name = entity.Name, 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() new()
{ {
Id = entity.Id, Id = entity.Id,
@@ -42,21 +51,20 @@ public static class EntityModeMappers
UpdatedAt = entity.UpdatedAt, UpdatedAt = entity.UpdatedAt,
ProductPriceId = entity.ProductPriceId, ProductPriceId = entity.ProductPriceId,
Quantity = entity.Quantity, 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() new()
{ {
Id = entity.Id, Id = entity.Id,
CreatedAt = entity.CreatedAt, CreatedAt = entity.CreatedAt,
UpdatedAt = entity.UpdatedAt, UpdatedAt = entity.UpdatedAt,
CustomerId = entity.CustomerId, CustomerId = entity.CustomerId,
OrderId = entity.OrderId, OrderId = entity.OrderId
QuoteId = entity.QuoteId
}; };
public static Quote ToModel(this Entities.Quote entity) => public static Quote ToModel(this Shop.Quotes.Entities.Quote entity) =>
new() new()
{ {
Id = entity.Id, Id = entity.Id,
@@ -66,10 +74,12 @@ public static class EntityModeMappers
ExpiredAt = entity.ExpiredAt, ExpiredAt = entity.ExpiredAt,
Reason = entity.Reason, Reason = entity.Reason,
ShoppingCartId = entity.ShoppingCartId, 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() new()
{ {
Id = entity.Id, Id = entity.Id,
@@ -93,7 +103,7 @@ public static class EntityModeMappers
Errors = entity.Errors Errors = entity.Errors
}; };
public static Customer ToModel(this Entities.Customer entity) => public static Customer ToModel(this Shop.Customers.Entities.Customer entity) =>
new() new()
{ {
Id = entity.Id, Id = entity.Id,
@@ -118,7 +128,7 @@ public static class EntityModeMappers
Whatsapp = entity.Whatsapp Whatsapp = entity.Whatsapp
}; };
public static Lead ToModel(this Entities.Lead entity) => public static Lead ToModel(this Shop.Leads.Entities.Lead entity) =>
new() new()
{ {
Id = entity.Id, Id = entity.Id,
@@ -136,10 +146,10 @@ public static class EntityModeMappers
ClickId = entity.ClickId, ClickId = entity.ClickId,
TargetId = entity.TargetId, TargetId = entity.TargetId,
WebClickId = entity.WebClickId, 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() new()
{ {
Id = entity.Id, Id = entity.Id,
@@ -147,35 +157,35 @@ public static class EntityModeMappers
UpdatedAt = entity.UpdatedAt, UpdatedAt = entity.UpdatedAt,
CustomerId = entity.CustomerId, CustomerId = entity.CustomerId,
Notes = entity.Notes, Notes = entity.Notes,
RefundId = entity.RefundId,
QuoteId = entity.QuoteId,
Status = entity.Status, Status = entity.Status,
ShoppingCartId = entity.ShoppingCartId,
DepositRequired = entity.DepositRequired,
Requirements = entity.Requirements, 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() new()
{ {
Id = entity.Id, Id = entity.Id,
CreatedAt = entity.CreatedAt, CreatedAt = entity.CreatedAt,
OrderId = entity.OrderId, OrderId = entity.OrderId,
Reason = entity.Reason, 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() new()
{ {
Id = entity.Id, Id = entity.Id,
Name = entity.Name, Name = entity.Name,
Description = entity.Description, 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() new()
{ {
Id = entity.Id, Id = entity.Id,
@@ -184,6 +194,6 @@ public static class EntityModeMappers
Active = entity.Active, Active = entity.Active,
CreatedAt = entity.CreatedAt, CreatedAt = entity.CreatedAt,
Discount = entity.Discount, Discount = entity.Discount,
UpdatedAt = entity.UpdatedAt UpdatedAt = entity.UpdatedAt
}; };
} }
@@ -1,6 +1,6 @@
using LiteCharms.Infrastructure.HealthChecks; using LiteCharms.Features.HealthChecks;
namespace LiteCharms.Extensions; namespace LiteCharms.Features.Extensions;
public static class HealthChecks public static class HealthChecks
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
namespace LiteCharms.Extensions; namespace LiteCharms.Features.Extensions;
public static class Monitoring public static class Monitoring
{ {
+2 -2
View File
@@ -1,6 +1,6 @@
using LiteCharms.Infrastructure.Database; using LiteCharms.Features.Shop.Postgres;
namespace LiteCharms.Extensions; namespace LiteCharms.Features.Extensions;
public static class Postgres public static class Postgres
{ {
+3 -3
View File
@@ -1,7 +1,7 @@
using LiteCharms.Abstractions; using LiteCharms.Features.Quartz;
using LiteCharms.Infrastructure.Quartz; using LiteCharms.Features.Quartz.Abstractions;
namespace LiteCharms.Extensions; namespace LiteCharms.Features.Extensions;
public static class Quartz public static class Quartz
{ {
+5 -5
View File
@@ -1,9 +1,9 @@
using LiteCharms.Abstractions; using LiteCharms.Features.ServiceBus;
using LiteCharms.Infrastructure.ServiceBus; using LiteCharms.Features.ServiceBus.Abstractions;
using LiteCharms.Infrastructure.ServiceBus.Exchanges; using LiteCharms.Features.ServiceBus.Exchanges;
using LiteCharms.Infrastructure.ServiceBus.Queues; using LiteCharms.Features.ServiceBus.Queues;
namespace LiteCharms.Extensions; namespace LiteCharms.Features.Extensions;
public static class ServiceBus public static class ServiceBus
{ {
@@ -130,6 +130,7 @@
<!-- Shared Usings --> <!-- Shared Usings -->
<ItemGroup> <ItemGroup>
<Using Include="Microsoft.AspNetCore.Builder" />
<Using Include="Microsoft.Extensions.Hosting" /> <Using Include="Microsoft.Extensions.Hosting" />
<Using Include="System.Text" /> <Using Include="System.Text" />
<Using Include="System.Text.Json" /> <Using Include="System.Text.Json" />