Rebadge the rest of the files
This commit is contained in:
12
src/Imprink.Domain/Common/Models/PagedResult.cs
Normal file
12
src/Imprink.Domain/Common/Models/PagedResult.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Imprink.Domain.Common.Models;
|
||||
|
||||
public class PagedResult<T>
|
||||
{
|
||||
public IEnumerable<T> Items { get; set; } = new List<T>();
|
||||
public int TotalCount { get; set; }
|
||||
public int PageNumber { get; set; }
|
||||
public int PageSize { get; set; }
|
||||
public int TotalPages => (int)Math.Ceiling((double)TotalCount / PageSize);
|
||||
public bool HasPreviousPage => PageNumber > 1;
|
||||
public bool HasNextPage => PageNumber < TotalPages;
|
||||
}
|
||||
15
src/Imprink.Domain/Common/Models/ProductFilterParameters.cs
Normal file
15
src/Imprink.Domain/Common/Models/ProductFilterParameters.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace Imprink.Domain.Common.Models;
|
||||
|
||||
public class ProductFilterParameters
|
||||
{
|
||||
public int PageNumber { get; set; } = 1;
|
||||
public int PageSize { get; set; } = 10;
|
||||
public string? SearchTerm { get; set; }
|
||||
public Guid? CategoryId { get; set; }
|
||||
public decimal? MinPrice { get; set; }
|
||||
public decimal? MaxPrice { get; set; }
|
||||
public bool? IsActive { get; set; } = true;
|
||||
public bool? IsCustomizable { get; set; }
|
||||
public string SortBy { get; set; } = "Name";
|
||||
public string SortDirection { get; set; } = "ASC";
|
||||
}
|
||||
Reference in New Issue
Block a user