Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions src/Entity/PainelInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

declare(strict_types=1);

/*
* This file is part of the Novo SGA project.
*
* (c) Rogerio Lino <rogeriolino@gmail.com>
*
* 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 <rogeriolino@gmail.com>
*/
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<int, PainelServicoInterface> */
public function getServicos(): Collection;
}
30 changes: 30 additions & 0 deletions src/Entity/PainelServicoInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

/*
* This file is part of the Novo SGA project.
*
* (c) Rogerio Lino <rogeriolino@gmail.com>
*
* 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 <rogeriolino@gmail.com>
*/
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;
}
33 changes: 33 additions & 0 deletions src/Repository/PainelRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

declare(strict_types=1);

/*
* This file is part of the Novo SGA project.
*
* (c) Rogerio Lino <rogeriolino@gmail.com>
*
* 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<PainelInterface>
*
* @author Rogerio Lino <rogeriolino@gmail.com>
*/
interface PainelRepositoryInterface extends ObjectRepository, BaseRepository
{
/**
* @return PainelInterface[]
*/
public function findByUnidade(UnidadeInterface|int $unidade): array;
}
28 changes: 28 additions & 0 deletions src/Repository/PainelServicoRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

declare(strict_types=1);

/*
* This file is part of the Novo SGA project.
*
* (c) Rogerio Lino <rogeriolino@gmail.com>
*
* 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<PainelServicoInterface>
*
* @author Rogerio Lino <rogeriolino@gmail.com>
*/
interface PainelServicoRepositoryInterface extends ObjectRepository, BaseRepository
{
}
38 changes: 38 additions & 0 deletions src/Service/PainelServiceInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

declare(strict_types=1);

/*
* This file is part of the Novo SGA project.
*
* (c) Rogerio Lino <rogeriolino@gmail.com>
*
* 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 <rogeriolino@gmail.com>
*/
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;
}
Loading