using BookmarkApi.Shared.DTOs;

namespace BookmarkApi.Core.Interfaces;

/// <summary>
/// 用户服务接口
/// </summary>
public interface IUserService
{
    /// <summary>
    /// 根据ID获取用户
    /// </summary>
    Task<UserDto?> GetByIdAsync(Guid userId);

    /// <summary>
    /// 根据邮箱获取用户
    /// </summary>
    Task<UserDto?> GetByEmailAsync(string email);

    /// <summary>
    /// 更新用户信息
    /// </summary>
    Task<UserDto?> UpdateProfileAsync(Guid userId, string? userName, string? avatar);

    /// <summary>
    /// 修改密码
    /// </summary>
    Task<bool> ChangePasswordAsync(Guid userId, string oldPassword, string newPassword);

    /// <summary>
    /// 获取所有用户（管理员）
    /// </summary>
    Task<PagedResult<UserDto>> GetAllUsersAsync(int page, int pageSize, string? search);

    /// <summary>
    /// 禁用/启用用户（管理员）
    /// </summary>
    Task<bool> SetUserStatusAsync(Guid userId, bool disabled);
}

