forked from gongxuegit/tiku-backend.net
feat: add scoreline dynamic records
This commit is contained in:
46
Tiku.Api/Contracts/ScorelineDtos.cs
Normal file
46
Tiku.Api/Contracts/ScorelineDtos.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Tiku.Application.Scoreline;
|
||||
|
||||
namespace Tiku.Api.Contracts;
|
||||
|
||||
public sealed class ScorelineQueryDto
|
||||
{
|
||||
[StringLength(100)]
|
||||
public string? TenantCode { get; set; }
|
||||
|
||||
public Guid? RegionId { get; set; }
|
||||
public Guid? SchoolId { get; set; }
|
||||
public Guid? MajorId { get; set; }
|
||||
|
||||
[StringLength(100)]
|
||||
public string? Keyword { get; set; }
|
||||
|
||||
[Range(1900, 3000)]
|
||||
public int? Year { get; set; }
|
||||
|
||||
[Range(1, 10000)]
|
||||
public int? Page { get; set; }
|
||||
|
||||
[Range(1, 200)]
|
||||
public int? PageSize { get; set; }
|
||||
|
||||
[Range(1, 2000)]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
public ScorelineFilter ToFilter(
|
||||
Guid tenantId,
|
||||
IReadOnlyCollection<ScorelineDynamicFilter>? dynamicFilters = null)
|
||||
{
|
||||
return new ScorelineFilter(
|
||||
tenantId,
|
||||
RegionId,
|
||||
SchoolId,
|
||||
MajorId,
|
||||
Keyword,
|
||||
Year,
|
||||
Page,
|
||||
PageSize,
|
||||
Limit,
|
||||
dynamicFilters);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user