23 lines
717 B
C#
23 lines
717 B
C#
using LiveForum.Model.Dto.Others;
|
|
|
|
namespace LiveForum.IService.Others
|
|
{
|
|
/// <summary>
|
|
/// 防沉迷校验服务接口
|
|
/// </summary>
|
|
public interface IAntiAddictionService
|
|
{
|
|
/// <summary>
|
|
/// 检查当前时间是否处于指定操作类型的防沉迷时段内
|
|
/// </summary>
|
|
/// <param name="actionType">"Post" | "Reply" | "Flower"</param>
|
|
/// <returns>true = 在防沉迷时段内(应拒绝操作)</returns>
|
|
Task<bool> IsRestrictedAsync(string actionType);
|
|
|
|
/// <summary>
|
|
/// 获取所有防沉迷规则(供 GetAppConfig 使用)
|
|
/// </summary>
|
|
Task<List<AntiAddictionRuleDto>> GetAllRulesAsync();
|
|
}
|
|
}
|