using BookmarkApi.Shared.DTOs;

namespace BookmarkApi.Core.Interfaces;

/// <summary>
/// 设备服务接口
/// </summary>
public interface IDeviceService
{
    /// <summary>
    /// 获取用户的所有设备
    /// </summary>
    Task<List<DeviceDto>> GetUserDevicesAsync(Guid userId);

    /// <summary>
    /// 获取设备详情
    /// </summary>
    Task<DeviceDto?> GetDeviceAsync(Guid deviceId);

    /// <summary>
    /// 更新设备名称
    /// </summary>
    Task<DeviceDto?> UpdateDeviceNameAsync(Guid deviceId, Guid userId, string deviceName);

    /// <summary>
    /// 删除设备
    /// </summary>
    Task<bool> DeleteDeviceAsync(Guid deviceId, Guid userId);

    /// <summary>
    /// 设置管理员设备
    /// </summary>
    Task<bool> SetAdminDeviceAsync(Guid deviceId, Guid userId);

    /// <summary>
    /// 检查设备是否为管理员设备
    /// </summary>
    Task<bool> IsAdminDeviceAsync(Guid deviceId);

    /// <summary>
    /// 更新设备活跃时间
    /// </summary>
    Task UpdateLastActiveAsync(Guid deviceId);
}

