src/Application/Internit/AcompanhamentoBundle/Entity/Acompanhamento.php line 22

Open in your IDE?
  1. <?php
  2. namespace App\Application\Internit\AcompanhamentoBundle\Entity;
  3. use App\Application\Internit\AcompanhamentoBundle\Repository\AcompanhamentoRepository;
  4. use App\Application\Internit\EmpreendimentoBundle\Entity\Empreendimento;
  5. use App\Application\Internit\EtapaAcompanhamentoBundle\Entity\EtapaAcompanhamento;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Doctrine\Common\Collections\Collection;
  10. use App\Entity\SonataMediaGallery;
  11. use App\Entity\SonataMediaMedia;
  12. use Doctrine\ORM\Mapping as ORM;
  13. use DateTime;
  14. /** Info:  */
  15. #[ORM\Table(name'acompanhamento')]
  16. #[ORM\Entity(repositoryClassAcompanhamentoRepository::class)]
  17. #[UniqueEntity('id')]
  18. class Acompanhamento
  19. {
  20.     #[ORM\Id]
  21.     #[ORM\GeneratedValue]
  22.     #[ORM\Column(name'id'type'integer'uniquetruenullablefalse)]
  23.     private ?int $id null;
  24.     #[Assert\NotNull]
  25.     #[Assert\NotBlank]
  26.     #[ORM\Column(name'nome'type'string'uniquefalsenullablefalse)]
  27.     private string $nome;
  28.     #[ORM\Column(name'descricao'type'text'uniquefalsenullabletrue)]
  29.     private ?string $descricao null;
  30.     #[ORM\Column(name'visivel'type'boolean'uniquefalsenullabletrue)]
  31.     private ?bool $visivel null;
  32.     #[ORM\ManyToOne(targetEntityEmpreendimento::class, inversedBy'acompanhamentos')]
  33.     #[ORM\JoinColumn(name'empreendimento_id'referencedColumnName'id'onDelete'SET NULL')]
  34.     private Empreendimento|null $empreendimento null;
  35.     #[ORM\OneToMany(mappedBy'acompanhamento'targetEntityEtapaAcompanhamento::class)]
  36.     private Collection $etapaAcompanhamento;
  37.     public function __construct()
  38.     {
  39.         $this->etapaAcompanhamento = new ArrayCollection();
  40.     }
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getNome(): string
  46.     {
  47.         return $this->nome;
  48.     }
  49.     public function setNome(string $nome): void
  50.     {
  51.         $this->nome $nome;
  52.     }
  53.     public function getDescricao(): ?string
  54.     {
  55.         return $this->descricao;
  56.     }
  57.     public function setDescricao(?string $descricao): void
  58.     {
  59.         $this->descricao $descricao;
  60.     }
  61.     public function getVisivel(): ?bool
  62.     {
  63.         return $this->visivel;
  64.     }
  65.     public function setVisivel(?bool $visivel): void
  66.     {
  67.         $this->visivel $visivel;
  68.     }
  69.     public function getEmpreendimento(): ?Empreendimento
  70.     {
  71.         return $this->empreendimento;
  72.     }
  73.     public function setEmpreendimento(?Empreendimento $empreendimento): void
  74.     {
  75.         $this->empreendimento $empreendimento;
  76.     }
  77.     /**
  78.      * @return Collection
  79.      */
  80.     public function getEtapaAcompanhamento(): Collection
  81.     {
  82.         return $this->etapaAcompanhamento;
  83.     }
  84.     /**
  85.      * @param Collection $etapaAcompanhamento
  86.      */
  87.     public function setEtapaAcompanhamento(Collection $etapaAcompanhamento): void
  88.     {
  89.         $this->etapaAcompanhamento $etapaAcompanhamento;
  90.     }
  91. }