feat: Implement Inventory Management Commands and Queries
Build and Deploy / build (push) Successful in 1m46s
Build and Deploy / build (push) Successful in 1m46s
- Added CreateWarehouseCommand and CreateWarehouseCommandHandler for warehouse creation. - Introduced RecordLossCommand and RecordLossCommandHandler to handle stock loss recording. - Created UpdateInventorySettingsCommand and its handler for updating inventory settings. - Implemented GetAllInventoryItemsQuery and its handler to retrieve inventory items with pagination. - Added GetAllWarehousesQuery and handler for fetching all warehouses. - Developed GetLowStockItemsQuery and handler to get items below a specified stock threshold. - Implemented GetStockMovementsQuery and handler for retrieving stock movement records. - Created mappings for inventory-related requests and responses in InventoryProfile. - Developed InventoryService to handle gRPC requests for inventory operations. - Added Protobuf definitions for inventory management services and messages.
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
namespace BackOffice.BFF.Application.InventoryCQ.Queries.GetStockMovements;
|
||||
|
||||
public record GetStockMovementsQuery : IRequest<GetStockMovementsResponseDto>
|
||||
{
|
||||
public long? InventoryItemId { get; init; }
|
||||
public long? ProductId { get; init; }
|
||||
public int? ProductType { get; init; }
|
||||
public int? MovementType { get; init; }
|
||||
public DateTime? FromDate { get; init; }
|
||||
public DateTime? ToDate { get; init; }
|
||||
public int PageIndex { get; init; } = 1;
|
||||
public int PageSize { get; init; } = 20;
|
||||
}
|
||||
|
||||
public class GetStockMovementsResponseDto
|
||||
{
|
||||
public int TotalCount { get; set; }
|
||||
public MetaData MetaData { get; set; } = new();
|
||||
public List<StockMovementDto> Movements { get; set; } = new();
|
||||
}
|
||||
|
||||
public class StockMovementDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long InventoryItemId { get; set; }
|
||||
public string ProductName { get; set; } = string.Empty;
|
||||
public int MovementType { get; set; }
|
||||
public string MovementTypeName { get; set; } = string.Empty;
|
||||
public int Quantity { get; set; }
|
||||
public int QuantityBefore { get; set; }
|
||||
public int QuantityAfter { get; set; }
|
||||
public long? OrderId { get; set; }
|
||||
public long? DiscountOrderId { get; set; }
|
||||
public string? ReferenceNumber { get; set; }
|
||||
public string? Note { get; set; }
|
||||
public long? PerformedByUserId { get; set; }
|
||||
public string? PerformedByUserName { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user