feat: 完成排行榜功能
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using Yi.Framework.AiHub.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.AiHub.Application.Contracts.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 排行榜查询输入
|
||||
/// </summary>
|
||||
public class RankingGetListInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 排行榜类型:0-模型,1-工具,不传返回全部
|
||||
/// </summary>
|
||||
public RankingTypeEnum? Type { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using Yi.Framework.AiHub.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.AiHub.Application.Contracts.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 排行榜项DTO
|
||||
/// </summary>
|
||||
public class RankingItemDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string Name { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
public string Description { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Logo地址
|
||||
/// </summary>
|
||||
public string? LogoUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 得分
|
||||
/// </summary>
|
||||
public decimal Score { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提供者
|
||||
/// </summary>
|
||||
public string Provider { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 排行榜类型
|
||||
/// </summary>
|
||||
public RankingTypeEnum Type { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Yi.Framework.AiHub.Application.Contracts.Dtos;
|
||||
|
||||
namespace Yi.Framework.AiHub.Application.Contracts.IServices;
|
||||
|
||||
/// <summary>
|
||||
/// 排行榜服务接口
|
||||
/// </summary>
|
||||
public interface IRankingService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取排行榜列表(全量返回)
|
||||
/// </summary>
|
||||
/// <param name="input">查询条件</param>
|
||||
/// <returns>排行榜列表</returns>
|
||||
Task<List<RankingItemDto>> GetListAsync(RankingGetListInput input);
|
||||
}
|
||||
Reference in New Issue
Block a user