namespace DeepDrftModels.DTOs;
///
/// Cross-project track filter contract. Threaded alongside (never inside) the external
/// PagingParameters<T>, which cannot carry a where-clause. An instance with all
/// properties null is equivalent to no filter — see TrackFilter.IsEmpty.
///
public class TrackFilter
{
/// Free-text, case-insensitive LIKE across TrackName, Artist, and Album.
public string? SearchText { get; set; }
/// Exact album match.
public string? Album { get; set; }
/// Exact genre match.
public string? Genre { get; set; }
///
/// True when no predicate is set. An empty filter must produce identical results to a null
/// filter, so callers collapse it to null before querying.
///
public bool IsEmpty =>
string.IsNullOrWhiteSpace(SearchText)
&& string.IsNullOrWhiteSpace(Album)
&& string.IsNullOrWhiteSpace(Genre);
}