chore(directory) : ferme contrats Repository (findBy) + bindings DI MCP Directory
Plumbing complementaire des outils MCP ajoutes en 99626b8 :
- declare findBy() sur Address/Contact/CommercialReport RepositoryInterface
(Prestataire l'avait deja) pour exposer la methode au contrat DDD
- bindings explicites des 4 repos dans services.yaml (cohrence avec
Client/Prospect, meme si Symfony auto-alias l'interface vers l'unique
implementation)
This commit is contained in:
@@ -9,4 +9,12 @@ use App\Module\Directory\Domain\Entity\Address;
|
||||
interface AddressRepositoryInterface
|
||||
{
|
||||
public function findById(int $id): ?Address;
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $criteria
|
||||
* @param null|array<string, string> $orderBy
|
||||
*
|
||||
* @return Address[]
|
||||
*/
|
||||
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array;
|
||||
}
|
||||
|
||||
@@ -9,4 +9,12 @@ use App\Module\Directory\Domain\Entity\CommercialReport;
|
||||
interface CommercialReportRepositoryInterface
|
||||
{
|
||||
public function findById(int $id): ?CommercialReport;
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $criteria
|
||||
* @param null|array<string, string> $orderBy
|
||||
*
|
||||
* @return CommercialReport[]
|
||||
*/
|
||||
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array;
|
||||
}
|
||||
|
||||
@@ -9,4 +9,12 @@ use App\Module\Directory\Domain\Entity\Contact;
|
||||
interface ContactRepositoryInterface
|
||||
{
|
||||
public function findById(int $id): ?Contact;
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $criteria
|
||||
* @param null|array<string, string> $orderBy
|
||||
*
|
||||
* @return Contact[]
|
||||
*/
|
||||
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user