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:
@@ -0,0 +1,19 @@
|
||||
namespace BackOffice.BFF.Application.InventoryCQ.Commands.AdjustStock;
|
||||
|
||||
public record AdjustStockCommand : IRequest<AdjustStockResponseDto>
|
||||
{
|
||||
public long ProductId { get; init; }
|
||||
public int ProductType { get; init; } // 1=Regular, 2=Discount
|
||||
public int NewQuantity { get; init; }
|
||||
public string? Note { get; init; }
|
||||
public long? WarehouseId { get; init; }
|
||||
}
|
||||
|
||||
public class AdjustStockResponseDto
|
||||
{
|
||||
public bool Success { get; set; }
|
||||
public int OldQuantity { get; set; }
|
||||
public int NewQuantity { get; set; }
|
||||
public int Difference { get; set; }
|
||||
public string? Message { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user