Created Order, Refund, Shipping
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
namespace LiteCharms.Features.MidrandBooks.Orders.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? InvoiceUrl { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace LiteCharms.Features.MidrandBooks.Orders.Models;
|
||||
|
||||
public class OrderItem
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
public long OrderId { get; set; }
|
||||
|
||||
public long AuthorBookId { get; set; }
|
||||
|
||||
public long ProductPriceId { get; set; }
|
||||
|
||||
public int Quantity { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace LiteCharms.Features.MidrandBooks.Orders.Models;
|
||||
|
||||
public record CreateOrder(long CustomerId, decimal TotalPrice, string? Notes);
|
||||
|
||||
public record CreateOrderItem(long AuthorBookId, long ProductPriceId, int Quantity);
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace LiteCharms.Features.MidrandBooks.Orders.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,18 @@
|
||||
namespace LiteCharms.Features.MidrandBooks.Orders.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 long AddressId { get; set; }
|
||||
|
||||
public long ShippingProviderId { get; set; }
|
||||
|
||||
public ShippingStatuses Status { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace LiteCharms.Features.MidrandBooks.Orders.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; }
|
||||
}
|
||||
Reference in New Issue
Block a user