using TeleWave.Application.Common.Models;

namespace TeleWave.Application.Common.Interfaces;

public sealed record RoleDto(Guid Id, string Name, bool IsSystem);

public interface IRoleService
{
    Task<Result<RoleDto>> CreateRoleAsync(string name, CancellationToken cancellationToken);

    Task<Result<RoleDto>> UpdateRoleAsync(
        Guid roleId,
        string name,
        CancellationToken cancellationToken
    );

    Task<Result> DeleteRoleAsync(Guid roleId, CancellationToken cancellationToken);

    Task<IReadOnlyList<RoleDto>> ListRolesAsync(CancellationToken cancellationToken);

    Task<Result> ChangeUserRoleAsync(Guid userId, Guid roleId, CancellationToken cancellationToken);
}
