feat: add asset and video readonly endpoints

This commit is contained in:
xiong
2026-07-26 14:48:15 +08:00
parent c6051f95f2
commit 0ff97e86cd
7 changed files with 798 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
using System.ComponentModel.DataAnnotations;
using Tiku.Application.Assets;
namespace Tiku.Api.Contracts;
public sealed class AssetQueryDto
{
[StringLength(100)]
public string? TenantCode { get; set; }
public Guid? RegionId { get; set; }
public Guid? SubjectId { get; set; }
public Guid? CategoryId { get; set; }
public Guid? ContentNodeId { get; set; }
public Guid? QuestionId { get; set; }
public Guid? AssetId { get; set; }
[StringLength(50)]
public string? AssetType { get; set; }
[StringLength(100)]
public string? Category { get; set; }
[StringLength(200)]
public string? AssetKey { get; set; }
[StringLength(100)]
public string? Keyword { get; set; }
public bool IncludeLocked { get; set; }
public bool IncludeInactive { get; set; }
[Range(1, 500)]
public int? Limit { get; set; }
public AssetFilter ToFilter(Guid tenantId)
{
return new AssetFilter(
tenantId,
RegionId,
SubjectId,
CategoryId,
ContentNodeId,
QuestionId,
AssetId,
AssetType,
Category,
AssetKey,
Keyword,
IncludeLocked,
IncludeInactive,
Limit);
}
}