src/Entity/TipologiePreimpostate.php line 16

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * TipologiePreimpostate
  9.  *
  10.  * @ORM\Table(name="tipologie_preimpostate")
  11.  * @ORM\Entity(repositoryClass="App\Repository\TipologiePreimpostateRepository")
  12.  */
  13. class TipologiePreimpostate
  14. {
  15.     /**
  16.      * @var int
  17.      *
  18.      * @ORM\Column(name="id", type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @var string
  25.      *
  26.      * @ORM\Column(name="nome", type="string", length=255)
  27.      */
  28.     private $nome;
  29.     /**
  30.      * @var string
  31.      *
  32.      * @ORM\Column(name="riferimento_importazione", type="string", length=255, nullable=true)
  33.      */
  34.     private $riferimentoImportazione;
  35.     /**
  36.      * @var string
  37.      *
  38.      * @ORM\Column(name="nota", type="string", length=255, nullable=true)
  39.      */
  40.     private $nota;
  41.     /**
  42.      * @ORM\OneToMany(targetEntity="TipologiePreimpostateLista", mappedBy="testata", cascade={"remove"})
  43.      */
  44.     private $lista;
  45.     /**
  46.      * @var \DateTime
  47.      *
  48.      * @ORM\Column(name="data_modifica", type="datetime")
  49.      */
  50.     private $dataModifica;
  51.     /**
  52.      * @var \DateTime
  53.      *
  54.      * @ORM\Column(name="data_creazione", type="datetime")
  55.      */
  56.     private $dataCreazione;
  57.     /**
  58.      * @ORM\ManyToOne(targetEntity="User")
  59.      * @ORM\JoinColumn(name="utente_id", referencedColumnName="id", onDelete="SET NULL")
  60.      */
  61.     private $utente;
  62.     /**
  63.      * Constructor
  64.      */
  65.     public function __construct()
  66.     {
  67.         $this->lista = new \Doctrine\Common\Collections\ArrayCollection();
  68.     }
  69.     public function getId(): ?int
  70.     {
  71.         return $this->id;
  72.     }
  73.     public function setNome(string $nome): static
  74.     {
  75.         $this->nome = $nome;
  76.         return $this;
  77.     }
  78.     public function getNome(): ?string
  79.     {
  80.         return $this->nome;
  81.     }
  82.     public function setNota(?string $nota): static
  83.     {
  84.         $this->nota = $nota;
  85.         return $this;
  86.     }
  87.     public function getNota(): ?string
  88.     {
  89.         return $this->nota;
  90.     }
  91.     public function setDataModifica(\DateTimeInterface $dataModifica): static
  92.     {
  93.         $this->dataModifica = $dataModifica;
  94.         return $this;
  95.     }
  96.     public function getDataModifica(): ?\DateTimeInterface
  97.     {
  98.         return $this->dataModifica;
  99.     }
  100.     public function setDataCreazione(\DateTimeInterface $dataCreazione): static
  101.     {
  102.         $this->dataCreazione = $dataCreazione;
  103.         return $this;
  104.     }
  105.     public function getDataCreazione(): ?\DateTimeInterface
  106.     {
  107.         return $this->dataCreazione;
  108.     }
  109.     public function setUtente(?User $utente): static
  110.     {
  111.         $this->utente = $utente;
  112.         return $this;
  113.     }
  114.     public function getUtente(): ?User
  115.     {
  116.         return $this->utente;
  117.     }
  118.     public function addListum(TipologiePreimpostateLista $listum): static
  119.     {
  120.         if (!$this->lista->contains($listum)) {
  121.             $this->lista->add($listum);
  122.             $listum->setTestata($this);
  123.         }
  124.         return $this;
  125.     }
  126.     public function removeListum(TipologiePreimpostateLista $listum): static
  127.     {
  128.         if ($this->lista->removeElement($listum)) {
  129.             // set the owning side to null (unless already changed)
  130.             if ($listum->getTestata() === $this) {
  131.                 $listum->setTestata(null);
  132.             }
  133.         }
  134.         return $this;
  135.     }
  136.     /**
  137.      * @return Collection<int, TipologiePreimpostateLista>
  138.      */
  139.     public function getLista(): Collection
  140.     {
  141.         return $this->lista;
  142.     }
  143.     public function setRiferimentoImportazione(?string $riferimentoImportazione): static
  144.     {
  145.         $this->riferimentoImportazione = $riferimentoImportazione;
  146.         return $this;
  147.     }
  148.     public function getRiferimentoImportazione(): ?string
  149.     {
  150.         return $this->riferimentoImportazione;
  151.     }
  152. }