feat(directory) : add Address entity with client/prospect dual ownership
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Module\Directory\Infrastructure\Doctrine;
|
||||
|
||||
use App\Module\Directory\Domain\Entity\Address;
|
||||
use App\Module\Directory\Domain\Repository\AddressRepositoryInterface;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Address>
|
||||
*/
|
||||
final class DoctrineAddressRepository extends ServiceEntityRepository implements AddressRepositoryInterface
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Address::class);
|
||||
}
|
||||
|
||||
public function findById(int $id): ?Address
|
||||
{
|
||||
return $this->find($id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user