forked from gongxuegit/tiku-backend.net
feat: add study content readonly endpoints
This commit is contained in:
45
Tiku.Api/Contracts/StudyContentDtos.cs
Normal file
45
Tiku.Api/Contracts/StudyContentDtos.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Tiku.Application.StudyContent;
|
||||
|
||||
namespace Tiku.Api.Contracts;
|
||||
|
||||
public sealed class StudyContentQueryDto
|
||||
{
|
||||
[StringLength(100)]
|
||||
public string? TenantCode { get; set; }
|
||||
|
||||
public Guid? RegionId { get; set; }
|
||||
|
||||
public Guid? UnitId { get; set; }
|
||||
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
public Guid? ChapterId { get; set; }
|
||||
|
||||
public Guid? EntryId { get; set; }
|
||||
|
||||
public Guid? ContentNodeId { get; set; }
|
||||
|
||||
[StringLength(100)]
|
||||
public string? Keyword { get; set; }
|
||||
|
||||
public bool IncludeContent { get; set; }
|
||||
|
||||
[Range(1, 2000)]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
public StudyContentFilter ToFilter(Guid tenantId)
|
||||
{
|
||||
return new StudyContentFilter(
|
||||
tenantId,
|
||||
RegionId,
|
||||
UnitId,
|
||||
SubjectId,
|
||||
ChapterId,
|
||||
EntryId,
|
||||
ContentNodeId,
|
||||
Keyword,
|
||||
IncludeContent,
|
||||
Limit);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user