Move all appropriate DTOs to sealed records.

This commit is contained in:
Joseph Milazzo 2025-05-04 08:41:29 -05:00
parent bc41b0256e
commit 3ca72b0b20
199 changed files with 234 additions and 221 deletions

View file

@ -5,7 +5,7 @@ using API.Entities.Enums;
namespace API.DTOs.Filtering;
#nullable enable
public class FilterDto
public sealed record FilterDto
{
/// <summary>
/// The type of Formats you want to be returned. An empty list will return all formats back

View file

@ -1,6 +1,6 @@
namespace API.DTOs.Filtering;
public class LanguageDto
public sealed record LanguageDto
{
public required string IsoCode { get; set; }
public required string Title { get; set; }

View file

@ -4,7 +4,7 @@
/// <summary>
/// Represents a range between two int/float/double
/// </summary>
public class Range<T>
public sealed record Range<T>
{
public T? Min { get; init; }
public T? Max { get; init; }

View file

@ -3,7 +3,7 @@
/// <summary>
/// Represents the Reading Status. This is a flag and allows multiple statues
/// </summary>
public class ReadStatus
public sealed record ReadStatus
{
public bool NotRead { get; set; } = true;
public bool InProgress { get; set; } = true;

View file

@ -3,7 +3,7 @@
/// <summary>
/// Sorting Options for a query
/// </summary>
public class SortOptions
public sealed record SortOptions
{
public SortField SortField { get; set; }
public bool IsAscending { get; set; } = true;

View file

@ -3,7 +3,7 @@
/// <summary>
/// For requesting an encoded filter to be decoded
/// </summary>
public class DecodeFilterDto
public sealed record DecodeFilterDto
{
public string EncodedFilter { get; set; }
}

View file

@ -1,6 +1,6 @@
namespace API.DTOs.Filtering.v2;
public class FilterStatementDto
public sealed record FilterStatementDto
{
public FilterComparison Comparison { get; set; }
public FilterField Field { get; set; }

View file

@ -6,7 +6,7 @@ namespace API.DTOs.Filtering.v2;
/// <summary>
/// Metadata filtering for v2 API only
/// </summary>
public class FilterV2Dto
public sealed record FilterV2Dto
{
/// <summary>
/// Not used in the UI.