src/Entity/Categorie.php line 49

  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.  * Categorie
  9.  *
  10.  * @ORM\Table(name="categorie", indexes={
  11.  *     @ORM\Index(name="categorie_codice_idx",
  12.  *     columns={
  13.  *      "codice"
  14.  *     }),
  15.  *     @ORM\Index(name="categorie_nomeunivoco_idx",
  16.  *     columns={
  17.  *      "nome_univoco"
  18.  *     }),
  19.  *     @ORM\Index(name="categorie_ordine_idx",
  20.  *     columns={
  21.  *      "ordinamento"
  22.  *     }),
  23.  *     @ORM\Index(name="categorie_nome_idx",
  24.  *     columns={
  25.  *      "nome"
  26.  *     }),
  27.  *     @ORM\Index(name="categorie_col_prov_idx",
  28.  *     columns={
  29.  *      "colonna_provenienza"
  30.  *     }),
  31.  *     @ORM\Index(name="categorie_cod_or_idx",
  32.  *     columns={
  33.  *      "codice_originale"
  34.  *     }),
  35.  *     @ORM\Index(name="categorie_desc_idx",
  36.  *     columns={
  37.  *      "descrizione"
  38.  *     }),
  39.  *     @ORM\Index(name="categorie_attivo_idx",
  40.  *     columns={
  41.  *      "attivo"
  42.  *     })
  43.  * })
  44.  * @ORM\Entity(repositoryClass="App\Repository\CategorieRepository")
  45.  */
  46. class Categorie
  47. {
  48.     /**
  49.      * @var int
  50.      *
  51.      * @ORM\Column(name="id", type="integer")
  52.      * @ORM\Id
  53.      * @ORM\GeneratedValue(strategy="AUTO")
  54.      */
  55.     private $id;
  56.     /**
  57.      * @var int
  58.      *
  59.      * @ORM\Column(name="ordinamento", type="integer", nullable=true)
  60.      */
  61.     private $ordinamento;
  62.     /**
  63.      * @var string
  64.      *
  65.      * @ORM\Column(name="nome", type="string", length=255, nullable=true)
  66.      */
  67.     private $nome;
  68.     /**
  69.      * @var string
  70.      *
  71.      * @ORM\Column(name="colonna_provenienza", type="string", length=255, nullable=true)
  72.      */
  73.     private $colonnaProvenienza;
  74.     /**
  75.      * @var string
  76.      *
  77.      * @ORM\Column(name="codice", type="string", length=255, nullable=true)
  78.      */
  79.     private $codice;
  80.     /**
  81.      * @var string
  82.      *
  83.      * @ORM\Column(name="codice_originale", type="string", length=255, nullable=true)
  84.      */
  85.     private $codiceOriginale;
  86.     /**
  87.      * @var string
  88.      *
  89.      * @ORM\Column(name="descrizione", type="string", length=255, nullable=true)
  90.      */
  91.     private $descrizione;
  92.     /**
  93.      * @var string
  94.      *
  95.      * @ORM\Column(name="title_seo", type="text", nullable=true)
  96.      */
  97.     private $titleSeo = "";
  98.     /**
  99.      * @var string
  100.      *
  101.      * @ORM\Column(name="nome_univoco", type="string", length=255, nullable=false)
  102.      */
  103.     private $nomeUnivoco;
  104.     /**
  105.      * @var string
  106.      *
  107.      * @ORM\Column(name="immagine", type="string", length=255, nullable=true)
  108.      */
  109.     private $immagine;
  110.     /**
  111.      * @var bool
  112.      *
  113.      * @ORM\Column(name="attivo", type="boolean")
  114.      */
  115.     private $attivo;
  116.     /**
  117.      * @var bool
  118.      *
  119.      * @ORM\Column(name="prezzo_su_richiesta", type="boolean", nullable=true)
  120.      */
  121.     private $prezzoSuRichiesta;
  122.     /**
  123.      * @var \DateTime
  124.      *
  125.      * @ORM\Column(name="data_modifica", type="datetime")
  126.      */
  127.     private $dataModifica;
  128.     /**
  129.      * @var \DateTime
  130.      *
  131.      * @ORM\Column(name="data_creazione", type="datetime")
  132.      */
  133.     private $dataCreazione;
  134.     /**
  135.      * @ORM\ManyToOne(targetEntity="User")
  136.      * @ORM\JoinColumn(name="utente_id", referencedColumnName="id", onDelete="SET NULL")
  137.      */
  138.     private $utente;
  139.     /**
  140.      * @ORM\OneToMany(targetEntity="CategorieInLingua", mappedBy="categoria")
  141.      */
  142.     private $categorieInLingua;
  143.     public function __construct()
  144.     {
  145.         $this->categorieInLingua = new ArrayCollection();
  146.     }
  147.     public function getId(): ?int
  148.     {
  149.         return $this->id;
  150.     }
  151.     public function getNome(): ?string
  152.     {
  153.         return $this->nome;
  154.     }
  155.     public function setNome(?string $nome): static
  156.     {
  157.         $this->nome = $nome;
  158.         return $this;
  159.     }
  160.     public function getColonnaProvenienza(): ?string
  161.     {
  162.         return $this->colonnaProvenienza;
  163.     }
  164.     public function setColonnaProvenienza(?string $colonnaProvenienza): static
  165.     {
  166.         $this->colonnaProvenienza = $colonnaProvenienza;
  167.         return $this;
  168.     }
  169.     public function getCodice(): ?string
  170.     {
  171.         return $this->codice;
  172.     }
  173.     public function setCodice(?string $codice): static
  174.     {
  175.         $this->codice = $codice;
  176.         return $this;
  177.     }
  178.     public function getCodiceOriginale(): ?string
  179.     {
  180.         return $this->codiceOriginale;
  181.     }
  182.     public function setCodiceOriginale(?string $codiceOriginale): static
  183.     {
  184.         $this->codiceOriginale = $codiceOriginale;
  185.         return $this;
  186.     }
  187.     public function getDescrizione(): ?string
  188.     {
  189.         return $this->descrizione;
  190.     }
  191.     public function setDescrizione(?string $descrizione): static
  192.     {
  193.         $this->descrizione = $descrizione;
  194.         return $this;
  195.     }
  196.     public function getTitleSeo(): ?string
  197.     {
  198.         return $this->titleSeo;
  199.     }
  200.     public function setTitleSeo(?string $titleSeo): static
  201.     {
  202.         $this->titleSeo = $titleSeo;
  203.         return $this;
  204.     }
  205.     public function getNomeUnivoco(): ?string
  206.     {
  207.         return $this->nomeUnivoco;
  208.     }
  209.     public function setNomeUnivoco(string $nomeUnivoco): static
  210.     {
  211.         $this->nomeUnivoco = $nomeUnivoco;
  212.         return $this;
  213.     }
  214.     public function getImmagine(): ?string
  215.     {
  216.         return $this->immagine;
  217.     }
  218.     public function setImmagine(?string $immagine): static
  219.     {
  220.         $this->immagine = $immagine;
  221.         return $this;
  222.     }
  223.     public function getAttivo(): ?bool
  224.     {
  225.         return $this->attivo;
  226.     }
  227.     public function setAttivo(bool $attivo): static
  228.     {
  229.         $this->attivo = $attivo;
  230.         return $this;
  231.     }
  232.     public function getPrezzoSuRichiesta(): ?bool
  233.     {
  234.         return $this->prezzoSuRichiesta;
  235.     }
  236.     public function setPrezzoSuRichiesta(?bool $prezzoSuRichiesta): static
  237.     {
  238.         $this->prezzoSuRichiesta = $prezzoSuRichiesta;
  239.         return $this;
  240.     }
  241.     public function getDataModifica(): ?\DateTimeInterface
  242.     {
  243.         return $this->dataModifica;
  244.     }
  245.     public function setDataModifica(\DateTimeInterface $dataModifica): static
  246.     {
  247.         $this->dataModifica = $dataModifica;
  248.         return $this;
  249.     }
  250.     public function getDataCreazione(): ?\DateTimeInterface
  251.     {
  252.         return $this->dataCreazione;
  253.     }
  254.     public function setDataCreazione(\DateTimeInterface $dataCreazione): static
  255.     {
  256.         $this->dataCreazione = $dataCreazione;
  257.         return $this;
  258.     }
  259.     public function getUtente(): ?User
  260.     {
  261.         return $this->utente;
  262.     }
  263.     public function setUtente(?User $utente): static
  264.     {
  265.         $this->utente = $utente;
  266.         return $this;
  267.     }
  268.     /**
  269.      * @return Collection<int, CategorieInLingua>
  270.      */
  271.     public function getCategorieInLingua(): Collection
  272.     {
  273.         return $this->categorieInLingua;
  274.     }
  275.     public function addCategorieInLingua(CategorieInLingua $categorieInLingua): static
  276.     {
  277.         if (!$this->categorieInLingua->contains($categorieInLingua)) {
  278.             $this->categorieInLingua->add($categorieInLingua);
  279.             $categorieInLingua->setCategoria($this);
  280.         }
  281.         return $this;
  282.     }
  283.     public function removeCategorieInLingua(CategorieInLingua $categorieInLingua): static
  284.     {
  285.         if ($this->categorieInLingua->removeElement($categorieInLingua)) {
  286.             // set the owning side to null (unless already changed)
  287.             if ($categorieInLingua->getCategoria() === $this) {
  288.                 $categorieInLingua->setCategoria(null);
  289.             }
  290.         }
  291.         return $this;
  292.     }
  293.     public function getOrdinamento(): ?int
  294.     {
  295.         return $this->ordinamento;
  296.     }
  297.     public function setOrdinamento(?int $ordinamento): static
  298.     {
  299.         $this->ordinamento = $ordinamento;
  300.         return $this;
  301.     }
  302.     public function isAttivo(): ?bool
  303.     {
  304.         return $this->attivo;
  305.     }
  306.     public function isPrezzoSuRichiesta(): ?bool
  307.     {
  308.         return $this->prezzoSuRichiesta;
  309.     }
  310. }