src/Entity/Caixa.php line 12
<?phpnamespace App\Entity;use App\Repository\CaixaRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: CaixaRepository::class)]class Caixa{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $nome = null;// Propriedade que mapeia a relação ManyToMany#[ORM\ManyToMany(targetEntity: Cliente::class, inversedBy: 'caixas')]#[ORM\JoinTable(name: 'caixa_cliente',joinColumns: [new ORM\JoinColumn(name: 'cliente_id', referencedColumnName: 'id')],inverseJoinColumns: [new ORM\JoinColumn(name: 'caixa_id', referencedColumnName: 'id')])]private Collection $clientes;#[ORM\Column]private ?\DateTimeImmutable $createdAt = null;#[ORM\OneToMany(mappedBy: 'caixa', targetEntity: Documento::class)]private Collection $documentos;#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]private ?\DateTimeInterface $data = null;#[ORM\Column(length: 255, nullable: true)]private ?string $assunto = null;#[ORM\ManyToOne(inversedBy: 'caixas')]private ?Fluxo $fluxo = null;#[ORM\ManyToOne(inversedBy: 'caixas')]private ?Cx $cx = null;#[ORM\ManyToOne(inversedBy: 'caixa')]private ?Etapa $etapa = null;#[ORM\Column(nullable: true)]private ?\DateTimeImmutable $higienizaAt = null;public function __construct(){$this->clientes = new ArrayCollection();$this->documentos = new ArrayCollection();$this->createdAt = new \DateTimeImmutable('America/Sao_Paulo');}public function getId(): ?int{return $this->id;}public function getNome(): ?string{return $this->nome;}public function setNome(string $nome): static{$this->nome = $nome;return $this;}/*** @return Collection<int, Cliente>*/public function getClientes(): Collection{return $this->clientes;}public function addCliente(Cliente $cliente): static{if (!$this->clientes->contains($cliente)) {$this->clientes->add($cliente);}return $this;}public function removeCliente(Cliente $cliente): static{$this->clientes->removeElement($cliente);return $this;}public function getCreatedAt(): ?\DateTimeImmutable{return $this->createdAt;}public function setCreatedAt(\DateTimeImmutable $createdAt): static{$this->createdAt = $createdAt;return $this;}/*** @return Collection<int, Documento>*/public function getDocumentos(): Collection{return $this->documentos;}public function addDocumento(Documento $documento): static{if (!$this->documentos->contains($documento)) {$this->documentos->add($documento);$documento->setCaixa($this);}return $this;}public function removeDocumento(Documento $documento): static{if ($this->documentos->removeElement($documento)) {// set the owning side to null (unless already changed)if ($documento->getCaixa() === $this) {$documento->setCaixa(null);}}return $this;}public function getData(): ?\DateTimeInterface{return $this->data;}public function setData(?\DateTimeInterface $data): static{$this->data = $data;return $this;}public function getAssunto(): ?string{return $this->assunto;}public function setAssunto(?string $assunto): static{$this->assunto = $assunto;return $this;}public function getFluxo(): ?Fluxo{return $this->fluxo;}public function setFluxo(?Fluxo $fluxo): static{$this->fluxo = $fluxo;return $this;}public function getCx(): ?Cx{return $this->cx;}public function setCx(?Cx $cx): static{$this->cx = $cx;return $this;}public function getEtapa(): ?Etapa{return $this->etapa;}public function setEtapa(?Etapa $etapa): static{$this->etapa = $etapa;return $this;}public function getHigienizaAt(): ?\DateTimeImmutable{return $this->higienizaAt;}public function setHigienizaAt(?\DateTimeImmutable $higienizaAt): static{$this->higienizaAt = $higienizaAt;return $this;}}