diff --git a/src/Entity/PainelInterface.php b/src/Entity/PainelInterface.php new file mode 100644 index 0000000..ec3a9cf --- /dev/null +++ b/src/Entity/PainelInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Novosga\Entity; + +use Doctrine\Common\Collections\Collection; + +/** + * PainelInterface + * + * @author Rogerio Lino + */ +interface PainelInterface +{ + public function getId(): ?int; + + public function getNome(): ?string; + public function setNome(?string $nome): static; + + public function getPublicId(): ?string; + public function setPublicId(?string $publicId): static; + + public function getUnidade(): ?UnidadeInterface; + public function setUnidade(?UnidadeInterface $unidade): static; + + /** @return Collection */ + public function getServicos(): Collection; +} diff --git a/src/Entity/PainelServicoInterface.php b/src/Entity/PainelServicoInterface.php new file mode 100644 index 0000000..1fab015 --- /dev/null +++ b/src/Entity/PainelServicoInterface.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Novosga\Entity; + +/** + * PainelServicoInterface + * + * @author Rogerio Lino + */ +interface PainelServicoInterface +{ + public function getId(): ?int; + + public function getServico(): ?ServicoInterface; + public function setServico(?ServicoInterface $servico): static; + + public function getPainel(): ?PainelInterface; + public function setPainel(?PainelInterface $painel): static; +} diff --git a/src/Repository/PainelRepositoryInterface.php b/src/Repository/PainelRepositoryInterface.php new file mode 100644 index 0000000..4ca8703 --- /dev/null +++ b/src/Repository/PainelRepositoryInterface.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Novosga\Repository; + +use Doctrine\Persistence\ObjectRepository; +use Novosga\Entity\PainelInterface; +use Novosga\Entity\UnidadeInterface; + +/** + * PainelRepositoryInterface + * + * @extends ObjectRepository + * + * @author Rogerio Lino + */ +interface PainelRepositoryInterface extends ObjectRepository, BaseRepository +{ + /** + * @return PainelInterface[] + */ + public function findByUnidade(UnidadeInterface|int $unidade): array; +} diff --git a/src/Repository/PainelServicoRepositoryInterface.php b/src/Repository/PainelServicoRepositoryInterface.php new file mode 100644 index 0000000..8eec8d8 --- /dev/null +++ b/src/Repository/PainelServicoRepositoryInterface.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Novosga\Repository; + +use Doctrine\Persistence\ObjectRepository; +use Novosga\Entity\PainelServicoInterface; + +/** + * PainelServicoRepositoryInterface + * + * @extends ObjectRepository + * + * @author Rogerio Lino + */ +interface PainelServicoRepositoryInterface extends ObjectRepository, BaseRepository +{ +} diff --git a/src/Service/PainelServiceInterface.php b/src/Service/PainelServiceInterface.php new file mode 100644 index 0000000..28659e8 --- /dev/null +++ b/src/Service/PainelServiceInterface.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Novosga\Service; + +use Novosga\Entity\PainelInterface; +use Novosga\Entity\UnidadeInterface; + +/** + * PainelServiceInterface + * + * @author Rogério Lino + */ +interface PainelServiceInterface +{ + public function getById(int $id): ?PainelInterface; + + public function getByPublicId(string $publicId): ?PainelInterface; + + /** @return PainelInterface[] */ + public function findByUnidade(UnidadeInterface $unidade): array; + + public function build(): PainelInterface; + + public function save(PainelInterface $painel): PainelInterface; + + public function remove(PainelInterface $painel): void; +}