Added Order models

This commit is contained in:
Khwezi Mngoma
2026-05-26 00:47:07 +02:00
parent 7136e4fc70
commit 20b747e89c
7 changed files with 137 additions and 3 deletions
@@ -163,4 +163,8 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Order\Entities\" />
</ItemGroup>
</Project> </Project>
@@ -0,0 +1,22 @@
namespace LiteCharms.Features.MidrandBooks.Order.Models;
public class Order
{
public long Id { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public long CustomerId { get; set; }
public OrderStatus Status { get; set; }
public decimal Total { get; set; }
public string[]? Notes { get; set; }
public string[]? Terms { get; set; }
public string? InvoiceUrl { get; set; }
}
@@ -0,0 +1,20 @@
namespace LiteCharms.Features.MidrandBooks.Order.Models;
public class Refund
{
public Guid Id { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public Guid OrderId { get; set; }
public RefundTypes Type { get; set; }
public RefundStatus Status { get; set; }
public string? Reason { get; set; }
public decimal Amount { get; set; }
}
@@ -0,0 +1,14 @@
namespace LiteCharms.Features.MidrandBooks.Order.Models;
public class Shipping
{
public long Id { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public long OrderId { get; set; }
public ShippingStatuses Status { get; set; }
}
@@ -0,0 +1,18 @@
namespace LiteCharms.Features.MidrandBooks.Order.Models;
public class ShippingProvider
{
public long Id { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public ShippingProviderTypes Type { get; set; }
public string? Name { get; set; }
public decimal? Price { get; set; }
public bool Enabled { get; set; }
}
@@ -1,6 +1,4 @@
using LiteCharms.Features.TechShop; namespace LiteCharms.Features.TechShop.Orders.Models;
namespace LiteCharms.Features.TechShop.Orders.Models;
public class Order public class Order
{ {
+58
View File
@@ -1,5 +1,63 @@
namespace LiteCharms.Features; namespace LiteCharms.Features;
public enum ShippingProviderTypes : int
{
Dsv = 0,
Pargo = 1,
Ram = 2,
TheCourierGuy = 3,
Paxi = 4,
FastWay = 5,
MdsCollivery = 6,
PostNet = 7,
Aramex = 8,
DHL = 9,
FedEx = 10,
UPS = 11,
USPS = 12,
AmazonLogistics = 13,
LocalCourier = 14,
Other = 15
}
public enum ShippingStatuses : int
{
Pending = 0,
Shipped = 1,
Delivered = 2,
Returned = 3,
Cancelled = 4,
}
public enum RefundTypes : int
{
Full = 0,
Partial = 1,
StoreCredit = 2,
Exchange = 3,
Other = 4
}
public enum RefundStatus : int
{
Pending = 0,
Approved = 1,
Rejected = 2,
Completed = 3,
Failed = 4,
}
public enum OrderStatus : int
{
Pending = 0,
Completed = 1,
Cancelled = 2,
Failed = 3,
Refunded = 4,
Error = 5,
OnHold = 6,
}
public enum ContactTypes : int public enum ContactTypes : int
{ {
Personal = 0, Personal = 0,