ProductList

This commit is contained in:
Michał Zieliński
2025-07-17 14:29:02 +02:00
parent 518eff0ec7
commit 2a42f16daf
17 changed files with 397 additions and 38 deletions

View File

@@ -0,0 +1,12 @@
namespace Bimix.Application.DTOModels.Common;
public class PagedResult<T>
{
public List<T> Items { get; set; } = new();
public int TotalCount { get; set; }
public int PageSize { get; set; }
public int Page { get; set; }
public int TotalPages => (int)Math.Ceiling(TotalCount / (double)PageSize);
public bool HasPreviousPage => Page > 1;
public bool HasNextPage => Page < TotalPages;
}

View File

@@ -0,0 +1,22 @@
namespace Bimix.Application.DTOModels;
public class ProductDto
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Code { get; set; } = string.Empty;
public string Ean { get; set; } = string.Empty;
public string StockAddresses { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
}
public class ProductFilterRequest
{
public string? Search { get; set; }
public string? Name { get; set; }
public string? Code { get; set; }
public string? Ean { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}