stock_ledger completed need to test
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
using Distribution.Models;
|
||||
|
||||
namespace Distribution.Features.Stock;
|
||||
|
||||
// Shared pagination wrapper
|
||||
public record PagedResponse<T>(int Page, int PageSize, int Total, List<T> Items);
|
||||
|
||||
// Balance
|
||||
public record StockBalanceResponse(
|
||||
Guid ItemId,
|
||||
string ItemName,
|
||||
Guid LocationId,
|
||||
LocationType LocationType,
|
||||
decimal Quantity,
|
||||
DateTime UpdatedAt);
|
||||
|
||||
public record StockTotalResponse(
|
||||
Guid ItemId,
|
||||
string ItemName,
|
||||
decimal TotalQuantity,
|
||||
List<StockBalanceResponse> Breakdown);
|
||||
|
||||
// Movement
|
||||
public record StockMovementResponse(
|
||||
Guid Id,
|
||||
Guid ItemId,
|
||||
string ItemName,
|
||||
Guid? FromLocationId,
|
||||
LocationType? FromLocationType,
|
||||
Guid? ToLocationId,
|
||||
LocationType? ToLocationType,
|
||||
decimal Quantity,
|
||||
MovementType Type,
|
||||
string? ReasonCode,
|
||||
Guid? ReferenceId,
|
||||
DateTime CreatedAt,
|
||||
Guid CreatedBy);
|
||||
|
||||
// Write requests
|
||||
public record TransferRequest(
|
||||
Guid ItemId,
|
||||
Guid FromLocationId,
|
||||
LocationType FromLocationType,
|
||||
Guid ToLocationId,
|
||||
LocationType ToLocationType,
|
||||
decimal Quantity,
|
||||
Guid? ReferenceId);
|
||||
|
||||
public record DamageRequest(
|
||||
Guid ItemId,
|
||||
Guid LocationId,
|
||||
LocationType LocationType,
|
||||
decimal Quantity,
|
||||
string ReasonCode);
|
||||
|
||||
public record CustomerReturnRequest(
|
||||
Guid ItemId,
|
||||
Guid VehicleId,
|
||||
decimal Quantity,
|
||||
Guid? ReferenceId);
|
||||
|
||||
public record AdjustmentRequest(
|
||||
Guid ItemId,
|
||||
Guid LocationId,
|
||||
LocationType LocationType,
|
||||
decimal Quantity,
|
||||
string ReasonCode);
|
||||
Reference in New Issue
Block a user