src/Entity/Prompt.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PromptRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClass: PromptRepository::class)]
  8. class Prompt
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id = null;
  14.     #[ORM\Column(length: 255, nullable: true)]
  15.     private ?string $nome = null;
  16.     #[ORM\Column(length: 255, nullable: true)]
  17.     private ?string $assunto = null;
  18.     #[ORM\Column(length: 255, nullable: true)]
  19.     private ?string $keywords = null;
  20.     #[ORM\Column(length: 255, nullable: true)]
  21.     private ?string $data_documento = null;
  22.     #[ORM\Column(length: 255, nullable: true)]
  23.     private ?string $tipos = null;
  24.     #[ORM\Column(length: 255, nullable: true)]
  25.     private ?string $classificacoes = null;
  26.     #[ORM\ManyToOne(inversedBy: 'prompts')]
  27.     private ?User $user = null;
  28.     #[ORM\ManyToOne(inversedBy: 'prompts')]
  29.     private ?Cliente $cliente = null;
  30.     
  31.     #[ORM\Column]
  32.     private ?\DateTimeImmutable $createdAt = null;
  33.     #[ORM\Column(nullable: true)]
  34.     private ?\DateTimeImmutable $updateAt = null;
  35.     /**
  36.      * @var Collection<int, Etapa>
  37.      */
  38.     #[ORM\OneToMany(targetEntity: Etapa::class, mappedBy: 'prompt')]
  39.     private Collection $etapas;
  40.     
  41.     #[ORM\Column(length: 255, nullable: true)]
  42.     private ?string $letras = null;
  43.     public function __construct()
  44.     {
  45.         $this->etapas = new ArrayCollection();
  46.     }
  47.     public function getId(): ?int
  48.     {
  49.         return $this->id;
  50.     }
  51.     public function getNome(): ?string
  52.     {
  53.         return $this->nome;
  54.     }
  55.     public function setNome(?string $nome): static
  56.     {
  57.         $this->nome = $nome;
  58.         return $this;
  59.     }
  60.     public function getAssunto(): ?string
  61.     {
  62.         return $this->assunto;
  63.     }
  64.     public function setAssunto(?string $assunto): static
  65.     {
  66.         $this->assunto = $assunto;
  67.         return $this;
  68.     }
  69.     public function getKeywords(): ?string
  70.     {
  71.         return $this->keywords;
  72.     }
  73.     public function setKeywords(?string $keywords): static
  74.     {
  75.         $this->keywords = $keywords;
  76.         return $this;
  77.     }
  78.     public function getDataDocumento(): ?string
  79.     {
  80.         return $this->data_documento;
  81.     }
  82.     public function setDataDocumento(?string $data_documento): static
  83.     {
  84.         $this->data_documento = $data_documento;
  85.         return $this;
  86.     }
  87.     public function getUser(): ?User
  88.     {
  89.         return $this->user;
  90.     }
  91.     public function setUser(?User $user): static
  92.     {
  93.         $this->user = $user;
  94.         return $this;
  95.     }
  96.     public function getCliente(): ?Cliente
  97.     {
  98.         return $this->cliente;
  99.     }
  100.     public function setCliente(?Cliente $cliente): static
  101.     {
  102.         $this->cliente = $cliente;
  103.         return $this;
  104.     }
  105.     public function getTipos(): ?string
  106.     {
  107.         return $this->tipos;
  108.     }
  109.     public function setTipos(?string $tipos): static
  110.     {
  111.         $this->tipos = $tipos;
  112.         return $this;
  113.     }
  114.     public function getClassificacoes(): ?string
  115.     {
  116.         return $this->classificacoes;
  117.     }
  118.     public function setClassificacoes(?string $classificacoes): static
  119.     {
  120.         $this->classificacoes = $classificacoes;
  121.         return $this;
  122.     }
  123.     public function getCreatedAt(): ?\DateTimeImmutable
  124.     {
  125.         return $this->createdAt;
  126.     }
  127.     public function setCreatedAt(\DateTimeImmutable $createdAt): static
  128.     {
  129.         $this->createdAt = $createdAt;
  130.         return $this;
  131.     }
  132.     public function getUpdateAt(): ?\DateTimeImmutable
  133.     {
  134.         return $this->updateAt;
  135.     }
  136.     public function setUpdateAt(?\DateTimeImmutable $updateAt): static
  137.     {
  138.         $this->updateAt = $updateAt;
  139.         return $this;
  140.     }
  141.     /**
  142.      * @return Collection<int, Etapa>
  143.      */
  144.     public function getEtapas(): Collection
  145.     {
  146.         return $this->etapas;
  147.     }
  148.     public function addEtapa(Etapa $etapa): static
  149.     {
  150.         if (!$this->etapas->contains($etapa)) {
  151.             $this->etapas->add($etapa);
  152.             $etapa->setPrompt($this);
  153.         }
  154.         return $this;
  155.     }
  156.     public function removeEtapa(Etapa $etapa): static
  157.     {
  158.         if ($this->etapas->removeElement($etapa)) {
  159.             // set the owning side to null (unless already changed)
  160.             if ($etapa->getPrompt() === $this) {
  161.                 $etapa->setPrompt(null);
  162.             }
  163.         }
  164.         return $this;
  165.     }
  166.     
  167.     public function getLetras(): ?string
  168.     {
  169.         return $this->letras;
  170.     }
  171.     public function setLetras(?string $letras): static
  172.     {
  173.         $this->letras = $letras;
  174.         return $this;
  175.     }
  176. }