Browse by Genre/Tag/Person with new metadata system for People (#3835)
Co-authored-by: Stepan Goremykin <s.goremykin@proton.me> Co-authored-by: goremykin <goremukin@gmail.com> Co-authored-by: Christopher <39032787+MrRobotjs@users.noreply.github.com> Co-authored-by: Fesaa <77553571+Fesaa@users.noreply.github.com>
This commit is contained in:
parent
00c4712fc3
commit
c52ed1f65d
147 changed files with 6612 additions and 958 deletions
8
API/DTOs/Filtering/PersonSortField.cs
Normal file
8
API/DTOs/Filtering/PersonSortField.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace API.DTOs.Filtering;
|
||||
|
||||
public enum PersonSortField
|
||||
{
|
||||
Name = 1,
|
||||
SeriesCount = 2,
|
||||
ChapterCount = 3
|
||||
}
|
|
@ -8,3 +8,12 @@ public sealed record SortOptions
|
|||
public SortField SortField { get; set; }
|
||||
public bool IsAscending { get; set; } = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// All Sorting Options for a query related to Person Entity
|
||||
/// </summary>
|
||||
public sealed record PersonSortOptions
|
||||
{
|
||||
public PersonSortField SortField { get; set; }
|
||||
public bool IsAscending { get; set; } = true;
|
||||
}
|
||||
|
|
|
@ -56,5 +56,12 @@ public enum FilterField
|
|||
/// Last time User Read
|
||||
/// </summary>
|
||||
ReadLast = 32,
|
||||
|
||||
}
|
||||
|
||||
public enum PersonFilterField
|
||||
{
|
||||
Role = 1,
|
||||
Name = 2,
|
||||
SeriesCount = 3,
|
||||
ChapterCount = 4,
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace API.DTOs.Filtering.v2;
|
||||
using API.DTOs.Metadata.Browse.Requests;
|
||||
|
||||
namespace API.DTOs.Filtering.v2;
|
||||
|
||||
public sealed record FilterStatementDto
|
||||
{
|
||||
|
@ -6,3 +8,10 @@ public sealed record FilterStatementDto
|
|||
public FilterField Field { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public sealed record PersonFilterStatementDto
|
||||
{
|
||||
public FilterComparison Comparison { get; set; }
|
||||
public PersonFilterField Field { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ public sealed record FilterV2Dto
|
|||
/// The name of the filter
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
public ICollection<FilterStatementDto> Statements { get; set; } = new List<FilterStatementDto>();
|
||||
public ICollection<FilterStatementDto> Statements { get; set; } = [];
|
||||
public FilterCombination Combination { get; set; } = FilterCombination.And;
|
||||
public SortOptions? SortOptions { get; set; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue