src/Entity/Corriere.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.  * Corriere
  9.  *
  10.  * @ORM\Table(name="corriere")
  11.  * @ORM\Entity(repositoryClass="App\Repository\CorriereRepository")
  12.  */
  13. class Corriere
  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="descrizione", type="text", nullable=true)
  33.      */
  34.     private $descrizione;
  35.     /**
  36.      * @var bool
  37.      *
  38.      * @ORM\Column(name="attivo", type="boolean")
  39.      */
  40.     private $attivo;
  41.     /**
  42.      * @var string
  43.      *
  44.      * @ORM\Column(name="testo_visualizzato", type="string", length=255, nullable=true)
  45.      */
  46.     private $testoVisualizzato;
  47.     /**
  48.      * @var string
  49.      *
  50.      * @ORM\Column(name="note", type="text", nullable=true, nullable=true)
  51.      */
  52.     private $note;
  53.     /**
  54.      * @ORM\OneToMany(targetEntity="App\Entity\CorriereListino", mappedBy="corriere", cascade={"remove"}, orphanRemoval=true)
  55.      */
  56.     private $listino;
  57.     /**
  58.      * @var \DateTime
  59.      *
  60.      * @ORM\Column(name="data_creazione", type="datetime")
  61.      */
  62.     private $dataCreazione;
  63.     /**
  64.      * @var \DateTime
  65.      *
  66.      * @ORM\Column(name="data_modifica", type="datetime")
  67.      */
  68.     private $dataModifica;
  69.     /**
  70.      * @ORM\ManyToOne(targetEntity="User")
  71.      * @ORM\JoinColumn(name="utente_modifica_id", referencedColumnName="id", onDelete="SET NULL")
  72.      */
  73.     private $utenteModifica;
  74.     /**
  75.      * Constructor
  76.      */
  77.     public function __construct()
  78.     {
  79.         $this->listino = new \Doctrine\Common\Collections\ArrayCollection();
  80.     }
  81.     public function getId(): ?int
  82.     {
  83.         return $this->id;
  84.     }
  85.     public function setNome(string $nome): static
  86.     {
  87.         $this->nome $nome;
  88.         return $this;
  89.     }
  90.     public function getNome(): ?string
  91.     {
  92.         return $this->nome;
  93.     }
  94.     public function setDescrizione(?string $descrizione): static
  95.     {
  96.         $this->descrizione $descrizione;
  97.         return $this;
  98.     }
  99.     public function getDescrizione(): ?string
  100.     {
  101.         return $this->descrizione;
  102.     }
  103.     public function setAttivo(bool $attivo): static
  104.     {
  105.         $this->attivo $attivo;
  106.         return $this;
  107.     }
  108.     public function getAttivo(): ?bool
  109.     {
  110.         return $this->attivo;
  111.     }
  112.     public function setTestoVisualizzato(?string $testoVisualizzato): static
  113.     {
  114.         $this->testoVisualizzato $testoVisualizzato;
  115.         return $this;
  116.     }
  117.     public function getTestoVisualizzato(): ?string
  118.     {
  119.         return $this->testoVisualizzato;
  120.     }
  121.     public function setNote(?string $note): static
  122.     {
  123.         $this->note $note;
  124.         return $this;
  125.     }
  126.     public function getNote(): ?string
  127.     {
  128.         return $this->note;
  129.     }
  130.     public function setDataCreazione(\DateTimeInterface $dataCreazione): static
  131.     {
  132.         $this->dataCreazione $dataCreazione;
  133.         return $this;
  134.     }
  135.     public function getDataCreazione(): ?\DateTimeInterface
  136.     {
  137.         return $this->dataCreazione;
  138.     }
  139.     public function setDataModifica(\DateTimeInterface $dataModifica): static
  140.     {
  141.         $this->dataModifica $dataModifica;
  142.         return $this;
  143.     }
  144.     public function getDataModifica(): ?\DateTimeInterface
  145.     {
  146.         return $this->dataModifica;
  147.     }
  148.     public function addListino(CorriereListino $listino): static
  149.     {
  150.         if (!$this->listino->contains($listino)) {
  151.             $this->listino->add($listino);
  152.             $listino->setCorriere($this);
  153.         }
  154.         return $this;
  155.     }
  156.     public function removeListino(CorriereListino $listino): static
  157.     {
  158.         if ($this->listino->removeElement($listino)) {
  159.             // set the owning side to null (unless already changed)
  160.             if ($listino->getCorriere() === $this) {
  161.                 $listino->setCorriere(null);
  162.             }
  163.         }
  164.         return $this;
  165.     }
  166.     /**
  167.      * @return Collection<int, CorriereListino>
  168.      */
  169.     public function getListino(): Collection
  170.     {
  171.         return $this->listino;
  172.     }
  173.     public function setUtenteModifica(?User $utenteModifica): static
  174.     {
  175.         $this->utenteModifica $utenteModifica;
  176.         return $this;
  177.     }
  178.     public function getUtenteModifica(): ?User
  179.     {
  180.         return $this->utenteModifica;
  181.     }
  182.     public function isAttivo(): ?bool
  183.     {
  184.         return $this->attivo;
  185.     }
  186. }