src/Entity/Registro.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RegistroRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassRegistroRepository::class)]
  9. class Registro
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $operacao null;
  17.     #[ORM\Column(length255)]
  18.     private  ?string $user null;
  19.     #[ORM\Column(length255)]
  20.     private  ?string $cliente null;
  21.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  22.     private ?\DateTimeInterface $data null;
  23.     #[ORM\ManyToOne(inversedBy'registros')]
  24.     private ?Documento $documento null;
  25.     #[ORM\OneToMany(mappedBy'registro'targetEntityEtapa::class)]
  26.     private Collection $etapas;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $ip null;
  29.     public function __construct()
  30.     {
  31.         $this->data = new \DateTimeImmutable('America/Sao_Paulo');
  32.         $this->etapas = new ArrayCollection();
  33.       
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getOperacao(): ?string
  40.     {
  41.         return $this->operacao;
  42.     }
  43.     public function setOperacao(string $operacao): static
  44.     {
  45.         $this->operacao $operacao;
  46.         return $this;
  47.     }
  48.     public function getUser(): string
  49.     {
  50.         return $this->user;
  51.     }
  52.     public function setUser(string $user): static
  53.     {
  54.         $this->user $user;
  55.         return $this;
  56.     }
  57.     public function getCliente(): string
  58.     {
  59.         return $this->cliente;
  60.     }
  61.     public function setCliente(string $cliente): static
  62.     {
  63.         $this->cliente $cliente;
  64.         return $this;
  65.     }
  66.     public function getData(): ?\DateTimeInterface
  67.     {
  68.         return $this->data;
  69.     }
  70.     public function setData(?\DateTimeInterface $data): static
  71.     {
  72.         $this->data $data;
  73.         return $this;
  74.     }
  75.     public function getDocumento(): ?Documento
  76.     {
  77.         return $this->documento;
  78.     }
  79.     public function setDocumento(?Documento $documento): static
  80.     {
  81.         $this->documento $documento;
  82.         return $this;
  83.     }
  84.     /**
  85.      * @return Collection<int, Etapa>
  86.      */
  87.     public function getEtapas(): Collection
  88.     {
  89.         return $this->etapas;
  90.     }
  91.     public function addEtapa(Etapa $etapa): static
  92.     {
  93.         if (!$this->etapas->contains($etapa)) {
  94.             $this->etapas->add($etapa);
  95.             $etapa->setRegistro($this);
  96.         }
  97.         return $this;
  98.     }
  99.     public function removeEtapa(Etapa $etapa): static
  100.     {
  101.         if ($this->etapas->removeElement($etapa)) {
  102.             // set the owning side to null (unless already changed)
  103.             if ($etapa->getRegistro() === $this) {
  104.                 $etapa->setRegistro(null);
  105.             }
  106.         }
  107.         return $this;
  108.     }
  109.     public function getIp(): ?string
  110.     {
  111.         return $this->ip;
  112.     }
  113.     public function setIp(?string $ip): static
  114.     {
  115.         $this->ip $ip;
  116.         return $this;
  117.     }
  118. }