Refactor inventory commands and queries for improved clarity and consistency
Build and Deploy / build (push) Failing after 2m12s

- Updated ProductType enum values to be more descriptive (RegularProduct, DiscountProduct).
- Removed unnecessary Success and Message properties from response DTOs in AddStock and AdjustStock commands.
- Renamed Note property to Reason in AdjustStock and RecordLoss commands, and added ReferenceNumber.
- Changed InventoryItemId to Id in UpdateInventorySettingsCommand for consistency.
- Updated pagination properties in various queries (PageIndex to Page).
- Enhanced GetAllInventoryItemsQuery and GetLowStockItemsQuery to include sorting options.
- Updated InventoryProfile mappings to reflect changes in DTOs and Protobuf definitions.
- Adjusted Protobuf definitions to align with new property names and structures.
This commit is contained in:
masoodafar-web
2026-01-03 15:38:22 +03:30
parent 989f4a799a
commit f027fd0b06
18 changed files with 196 additions and 197 deletions
@@ -3,17 +3,15 @@ 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 ProductType { get; init; } // 1=RegularProduct, 2=DiscountProduct
public int NewQuantity { get; init; }
public string? Note { get; init; }
public long? WarehouseId { get; init; }
public string? Reason { get; init; }
public string? ReferenceNumber { get; init; }
}
public class AdjustStockResponseDto
{
public bool Success { get; set; }
public int OldQuantity { get; set; }
public int PreviousQuantity { get; set; }
public int NewQuantity { get; set; }
public int Difference { get; set; }
public string? Message { get; set; }
}