using Domain.Entities; using Domain.Exceptions; namespace Features.UserManagement.Repository; /// /// Repository for CRUD operations on user account records. /// public interface IUserAccountRepository { /// Returns null if no user account exists with the given ID. Task GetByIdAsync(Guid id); /// Returns user accounts ordered by creation date descending. /// null for no limit. /// null for no offset. Task> GetAllAsync(int? limit, int? offset); /// Updates the mutable fields of an existing user account. /// Must have a valid UserAccountId. /// Thrown when no user account exists with the given ID. Task UpdateAsync(UserAccount userAccount); /// Deletes the user account with the given ID. /// Thrown when no user account exists with the given ID. Task DeleteAsync(Guid id); /// Returns null if no user account exists with the given username. Task GetByUsernameAsync(string username); /// Returns null if no user account exists with the given email address. Task GetByEmailAsync(string email); }