Add DeliveryTask, Payment, and Sale features
Implemented DeliveryTask, Payment, and Sale entities with full CRUD, business logic, and API endpoints. Updated Order/OrderItem for sale linkage and fulfillment tracking. Registered new DbSets and DI services. Revised documentation for delivery, sale, and payment workflows.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using Distribution.Models;
|
||||
|
||||
namespace Distribution.Features.Sale;
|
||||
|
||||
public record SaleItemRequest(Guid ItemId, int Quantity, decimal? UnitPrice = null);
|
||||
|
||||
public record CreateSaleRequest(
|
||||
Guid StoreId,
|
||||
DateTime SaleDate,
|
||||
decimal TotalAmount,
|
||||
bool FulfillImmediately,
|
||||
Guid? RideId,
|
||||
List<SaleItemRequest> Items);
|
||||
|
||||
public record SaleItemResponse(Guid ItemId, int Quantity, int QuantityFulfilled, decimal UnitPrice);
|
||||
|
||||
public record SaleResponse(
|
||||
Guid Id,
|
||||
DateTime SaleDate,
|
||||
Guid StoreId,
|
||||
Guid CreatedByUserId,
|
||||
Guid? RideId,
|
||||
decimal TotalAmount,
|
||||
SaleStatus Status,
|
||||
PaymentStatus PaymentStatus,
|
||||
bool FulfillImmediately,
|
||||
DateTime? CompletedAt,
|
||||
Guid OrderId,
|
||||
OrderStatus OrderStatus,
|
||||
DateTime? OrderFulfilledAt,
|
||||
List<SaleItemResponse> Items,
|
||||
bool IsActive,
|
||||
DateTime CreatedAt);
|
||||
Reference in New Issue
Block a user