src/Application/Internit/AgendamentoBundle/Entity/Agendamento.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Application\Internit\AgendamentoBundle\Entity;
  3. use App\Application\Internit\AgendamentoBundle\Repository\AgendamentoRepository;
  4. use App\Application\Internit\OrdemServicoBundle\Entity\OrdemServico;
  5. use App\Application\Internit\PeriodoAgendamentoBundle\Entity\PeriodoAgendamento;
  6. use App\Application\Internit\AndamentoSolicitacaoBundle\Entity\AndamentoSolicitacao;
  7. use App\Application\Internit\ProfissionalBundle\Entity\Profissional;
  8. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use Doctrine\Common\Collections\Collection;
  12. use App\Entity\SonataMediaGallery;
  13. use App\Entity\SonataMediaMedia;
  14. use Doctrine\ORM\Mapping as ORM;
  15. use DateTime;
  16. /** Info:  */
  17. #[ORM\Table(name'agendamento')]
  18. #[ORM\Entity(repositoryClassAgendamentoRepository::class)]
  19. #[UniqueEntity('id')]
  20. class Agendamento
  21. {
  22.     #[ORM\Id]
  23.     #[ORM\GeneratedValue]
  24.     #[ORM\Column(name'id'type'integer'uniquetruenullablefalse)]
  25.     private ?int $id null;
  26.     #[Assert\NotNull]
  27.     #[Assert\NotBlank]
  28.     #[Assert\Date]
  29.     #[ORM\Column(name'data'type'date'uniquefalsenullablefalse)]
  30.     private DateTime $data;
  31.     #[ORM\Column(name'hora'type'time'uniquefalsenullablefalse)]
  32.     private DateTime $hora;
  33.     #[Assert\NotNull]
  34.     #[Assert\NotBlank]
  35.     #[ORM\Column(name'observacoes'type'text'uniquefalsenullablefalse)]
  36.     private string $observacoes;
  37.     #[ORM\OneToOne(mappedBy'agendamento'targetEntityAndamentoSolicitacao::class)]
  38.     private $andamento;
  39.     #[ORM\JoinTable(name'profissional_agendamento')]
  40.     #[ORM\JoinColumn(name'agendamento_id'referencedColumnName'id')] // , onDelete: 'SET NULL'
  41.     #[ORM\InverseJoinColumn(name'profissional_id'referencedColumnName'id')]
  42.     #[ORM\ManyToMany(targetEntityProfissional::class, inversedBy'agendamentos')]
  43.     private Collection $profissionais;
  44.     #[ORM\OneToMany(mappedBy'agendamento'targetEntityOrdemServico::class)]
  45.     private Collection $ordemServicos;
  46.     #[ORM\ManyToOne(targetEntitySonataMediaGallery::class, cascade: ['persist'])]
  47.     private mixed $anexos;
  48.     public function __construct()
  49.     {
  50.         $this->profissionais = new ArrayCollection();
  51.         $this->ordemServicos = new ArrayCollection();
  52.     }
  53.     public function getId(): ?int
  54.     {
  55.         return $this->id;
  56.     }
  57.     public function getData(): DateTime
  58.     {
  59.         return $this->data;
  60.     }
  61.     public function setData(DateTime $data): void
  62.     {
  63.         $this->data $data;
  64.     }
  65.     public function getObservacoes(): string
  66.     {
  67.         return $this->observacoes;
  68.     }
  69.     public function setObservacoes(string $observacoes): void
  70.     {
  71.         $this->observacoes $observacoes;
  72.     }
  73.     public function getHora(): DateTime
  74.     {
  75.         return $this->hora;
  76.     }
  77.     public function setHora(DateTime $hora): void
  78.     {
  79.         $this->hora $hora;
  80.     }
  81.     public function getAndamento()
  82.     {
  83.         return $this->andamento;
  84.     }
  85.     public function setAndamento$andamento): void
  86.     {
  87.         $this->andamento $andamento;
  88.     }
  89.     public function getProfissionais(): Collection
  90.     {
  91.         return $this->profissionais;
  92.     }
  93.     public function setProfissionais(Collection $profissionais): void
  94.     {
  95.         $this->profissionais $profissionais;
  96.     }
  97.     public function getOrdemServicos(): Collection
  98.     {
  99.         return $this->ordemServicos;
  100.     }
  101.     public function setOrdemServicos(Collection $ordemServicos): void
  102.     {
  103.         $this->ordemServicos $ordemServicos;
  104.     }
  105.     public function getAnexos(): mixed
  106.     {
  107.         return $this->anexos;
  108.     }
  109.     public function setAnexos(mixed $anexos): void
  110.     {
  111.         $this->anexos $anexos;
  112.     }
  113. }