using Distribution.Models; namespace Distribution.Features.ShopPO; // DiscountSchemeIds: the FlatPercent/SlabDiscount scheme the user accepted (at most one). Null = leave as is. public record CreateShopPORequest(Guid StoreId, List Items, Guid? RaisedByUserId = null, List? DiscountSchemeIds = null); // IsFree + SchemeId mark a free-issue line the user accepted from a scheme suggestion; its price is forced to 0. public record ShopPOItemRequest(Guid ItemId, int Quantity, decimal? UnitPrice = null, bool IsFree = false, Guid? SchemeId = null); public record UpdateShopPOItemsRequest(List Items, List? DiscountSchemeIds = null); public record ConfirmShopPORequest(Guid? ConfirmedByUserId = null); public record CancelShopPORequest(string Reason, Guid? CancelledByUserId = null); public record ShopPOItemResponse(Guid Id, Guid ItemId, string ItemName, int Quantity, int QuantityFulfilled, decimal UnitPrice, bool IsActive, bool IsFree = false, Guid? SchemeId = null, string? SchemeName = null); public record ShopPODiscountResponse(Guid SchemeId, string SchemeName, decimal Amount); public record ShopPOResponse( Guid Id, Guid StoreId, string StoreName, string? StoreAddress, string? StoreContactNumber, Guid RaisedById, Guid? InvoiceId, decimal TotalAmount, ShopPOStatus Status, DateTime? ConfirmedAt, Guid? ConfirmedBy, DateTime? FulfilledAt, List Items, bool IsActive, DateTime CreatedAt, string? RaisedByName = null, string? RaisedByRole = null, string? ConfirmedByName = null, string? ConfirmedByRole = null, Guid? CancelledBy = null, DateTime? CancelledAt = null, string? CancelReason = null, string? CancelledByName = null, string? CancelledByRole = null, List? Discounts = null);