Merge pull request #11 from StewKI/feature-user-model-expansion

Expanded on user domain model
This commit is contained in:
Veljko
2026-02-10 13:00:48 +01:00
committed by GitHub
7 changed files with 87 additions and 10 deletions

View File

@@ -3,4 +3,9 @@ using AipsCore.Domain.Models.User.ValueObjects;
namespace AipsCore.Application.Models.User.Command.CreateUser;
public record CreateUserCommand(string Username, string Email) : ICommand<UserId>;
public record CreateUserCommand(
string Username,
string Email,
DateTime CreatedAt,
DateTime DeletedAt)
: ICommand<UserId>;

View File

@@ -18,7 +18,7 @@ public class CreateUserCommandHandler : ICommandHandler<CreateUserCommand, UserI
public async Task<UserId> Handle(CreateUserCommand command, CancellationToken cancellationToken = default)
{
var user = Domain.Models.User.User.Create(command.Email, command.Username);
var user = Domain.Models.User.User.Create(command.Email, command.Username, command.CreatedAt, command.DeletedAt);
await _userRepository.Save(user, cancellationToken);
await _unitOfWork.SaveChangesAsync(cancellationToken);