refactor(domain): Reorganize aggregates into dedicated namespace structure

This commit is contained in:
m.jalmoudy
2025-12-02 16:59:42 +03:30
parent a014c36f63
commit dfb0658064
3 changed files with 4 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
namespace DistributingCarriers\Application\Handlers;
use DistributingCarriers\Application\Commands\RegisterCarrierCommand;
use DistributingCarriers\Domain\Carrier;
use DistributingCarriers\Domain\Aggregates\Carrier;
use DistributingCarriers\Infrastructure\EventSourcing\EventStore;
class RegisterCarrierHandler
@@ -23,6 +23,6 @@ class RegisterCarrierHandler
$this->eventStore->save($carrier->getId(), $carrier->getUncommittedChanges(), $carrier->getVersion());
$carrier->markChangesAsCommitted();
echo "Carrier registered with ID: " . $carrierId . "\n";
echo "Carrier registered with ID: $carrierId\n";
}
}

View File

@@ -1,6 +1,6 @@
<?php
namespace DistributingCarriers\Domain;
namespace DistributingCarriers\Domain\Aggregates;
abstract class AggregateRoot
{

View File

@@ -1,6 +1,6 @@
<?php
namespace DistributingCarriers\Domain;
namespace DistributingCarriers\Domain\Aggregates;
use DistributingCarriers\Domain\Events\CarrierRegistered;