feature/apply-filter (#18)

Co-authored-by: Maxime Adler <madler@sqli.com>
Reviewed-on: #18
This commit was merged in pull request #18.
This commit is contained in:
2025-04-20 15:43:24 +02:00
parent d90811723a
commit 51dab81121
43 changed files with 505 additions and 189 deletions

View File

@@ -2,6 +2,6 @@
public class GlobalConstants
{
public static int NUMBER_PER_PAGE = 50;
}

View File

@@ -7,4 +7,6 @@ public class CategoriesDto
public List<TagDto>? Tags { get; set; }
public List<DeveloperDto>? Developers { get; set; }
public List<PublisherDto>? Publishers { get; set; }
public List<int>? ReleaseYears { get; set; }
public List<StorageSpaceDto>? StorageSpaces { get; set; }
}

View File

@@ -0,0 +1,20 @@
namespace GameIdeas.Shared.Dto;
public class GameDetailDto
{
public int? Id { get; set; }
public string? Title { get; set; }
public DateTime? ReleaseDate { get; set; }
public DateTime? CreationDate { get; set; }
public int CreationUserId { get; set; }
public DateTime? ModificationDate { get; set; }
public int? ModificationUserId { get; set; }
public double? StorageSpace { get; set; }
public string? Description { get; set; }
public int Interest { get; set; } = 3;
public List<PlatformDto>? Platforms { get; set; }
public List<PropertyDto>? Properties { get; set; }
public List<TagDto>? Tags { get; set; }
public List<PublisherDto>? Publishers { get; set; }
public List<DeveloperDto>? Developers { get; set; }
}

View File

@@ -5,18 +5,8 @@ public class GameDto
public int? Id { get; set; }
public string? Title { get; set; }
public DateTime? ReleaseDate { get; set; }
public DateTime? CreationDate { get; set; }
public UserDto? CreationUser { get; set; }
public int CreationUserId { get; set; }
public DateTime? ModificationDate { get; set; }
public UserDto? ModificationUser { get; set; }
public int? ModificationUserId { get; set; }
public IEnumerable<PlatformDto>? Platforms { get; set; }
public IEnumerable<TagDto>? Tags { get; set; }
public double? StorageSpace { get; set; }
public string? Description { get; set; }
public int Interest { get; set; } = 3;
public List<PlatformDto>? Platforms { get; set; }
public List<PropertyDto>? Properties { get; set; }
public List<TagDto>? Tags { get; set; }
public List<PublisherDto>? Publishers { get; set; }
public List<DeveloperDto>? Developers { get; set; }
}

View File

@@ -1,19 +1,20 @@

using GameIdeas.Shared.Enum;
namespace GameIdeas.Shared.Dto;
public class GameFilterDto
{
public SortTypeDto? SortType { get; set; }
public SortPropertyDto? SortProperty { get; set; }
public int CurrentPage { get; set; } = 1;
public SortType? SortType { get; set; }
public string? SortPropertyName { get; set; }
public string? Title { get; set; }
public List<PlatformDto>? Platforms { get; set; }
public List<PropertyDto>? Properties { get; set; }
public List<TagDto>? Tags { get; set; }
public List<PublisherDto>? Publishers { get; set; }
public List<DeveloperDto>? Developers { get; set; }
public int MinInterest { get; set; } = 1;
public int MaxInterest { get; set; } = 5;
public List<int>? PlatformIds { get; set; }
public List<int>? PropertyIds { get; set; }
public List<int>? TagIds { get; set; }
public List<int>? PublisherIds { get; set; }
public List<int>? DeveloperIds { get; set; }
public int? MinInterest { get; set; }
public int? MaxInterest { get; set; }
public List<int>? ReleaseYears { get; set; }
public int? MinStorageSize { get; set; }
public int? MaxStorageSize { get; set; }
public List<int>? StorageSpaces { get; set; }
}

View File

@@ -1,7 +0,0 @@
namespace GameIdeas.Shared.Dto;
public class PaggingDto
{
public int CurrentPage { get; set; }
public int NumberPerPage { get; set; }
}

View File

@@ -2,6 +2,6 @@
public class SortPropertyDto
{
public Func<GameDto, object>? SortProperty { get; set; }
public string PropertyName { get; set; } = string.Empty;
public string Label { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,8 @@
namespace GameIdeas.Shared.Dto;
public class StorageSpaceDto
{
public int? MinSize { get; set; }
public int? MaxSize { get; set; }
public int Id { get; set; }
}