astral-api/Astral.Services/Interfaces/IUserService.cs
2024-12-11 20:51:13 +00:00

27 lines
859 B
C#

// <copyright file="IUserService.cs" company="alveus.dev">
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
// </copyright>
using Astral.Services.Dtos;
namespace Astral.Services.Interfaces;
/// <summary>
/// User Service.
/// </summary>
public interface IUserService
{
/// <summary>
/// Create a new user and return its user dto.
/// </summary>
/// <param name="createUser">Instance of <see cref="CreateUserDto" />.</param>
/// <returns>Instance of <see cref="UserDto" />.</returns>
Task<UserDto> CreateNewUser(CreateUserDto createUser);
/// <summary>
/// Fetch a user based on their user id.
/// </summary>
/// <param name="userId">User id.</param>
/// <returns>Instance of <see cref="UserDto" />, or null if not found.</returns>
Task<UserDto> FindById(Guid userId);
}