feat : mise à jour de la structure du projet
This commit is contained in:
22
src/Module/Core/Domain/Event/UserCreated.php
Normal file
22
src/Module/Core/Domain/Event/UserCreated.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Module\Core\Domain\Event;
|
||||
|
||||
use App\Shared\Domain\Event\DomainEventInterface;
|
||||
use DateTimeImmutable;
|
||||
|
||||
final readonly class UserCreated implements DomainEventInterface
|
||||
{
|
||||
public function __construct(
|
||||
public int $userId,
|
||||
public string $username,
|
||||
private DateTimeImmutable $occurredAt = new DateTimeImmutable(),
|
||||
) {}
|
||||
|
||||
public function occurredAt(): DateTimeImmutable
|
||||
{
|
||||
return $this->occurredAt;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user