src/Entity/Cliente.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity
  8.  * @ORM\Table(name="clienti")
  9.  */
  10. class Cliente
  11. {
  12.     /**
  13.      * @var int
  14.      *
  15.      * @ORM\Column(type="integer")
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue
  18.      */
  19.     private $id;
  20.     /**
  21.      * @var string
  22.      *
  23.      * @ORM\Column(type="string", length=150)
  24.      */
  25.     private $name;
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(type="string", length=150)
  30.      */
  31.     private $label;
  32.     /**
  33.      * @var string
  34.      *
  35.      * @ORM\Column(type="string")
  36.      */
  37.     private $address;
  38.     /**
  39.      * @var string
  40.      *
  41.      * @ORM\Column(type="string", length=5)
  42.      */
  43.     private $zip;
  44.     /**
  45.      * @var string
  46.      *
  47.      * @ORM\Column(type="string")
  48.      */
  49.     private $city;
  50.     /**
  51.      * @var string
  52.      *
  53.      * @ORM\Column(type="string")
  54.      */
  55.     private $state;
  56.     /**
  57.      * @var string
  58.      *
  59.      * @ORM\Column(type="string")
  60.      */
  61.     private $country;
  62.     /**
  63.      * @var string
  64.      *
  65.      * @ORM\Column(type="string", length=17)
  66.      */
  67.     private $fiscalId;
  68.     /**
  69.      * @var string
  70.      *
  71.      * @ORM\Column(type="string", length=13)
  72.      */
  73.     private $vat;
  74.     /**
  75.      * @var string|null
  76.      *
  77.      * @ORM\Column(type="string", length=20, nullable=true)
  78.      */
  79.     private $telephone;
  80.     /**
  81.      * @var string|null
  82.      *
  83.      * @ORM\Column(type="string", nullable=true)
  84.      */
  85.     private $email;
  86.     /**
  87.      * @var string|null
  88.      *
  89.      * @ORM\Column(type="string", nullable=true)
  90.      */
  91.     private $site;
  92.     /**
  93.      * @var string|null
  94.      *
  95.      * @ORM\Column(type="string", nullable=true)
  96.      */
  97.     private $contactUrl;
  98.     /**
  99.      * @var Servizio[]|null
  100.      *
  101.      * @ORM\OneToMany(targetEntity=Servizio::class, mappedBy="client")
  102.      */
  103.     private $services;
  104.     /**
  105.      * @var Progetto[]|null
  106.      *
  107.      * @ORM\OneToMany(targetEntity=Progetto::class, mappedBy="client")
  108.      */
  109.     private $projects;
  110.     /**
  111.      * @var string|null
  112.      *
  113.      * @ORM\Column(type="string", nullable=true)
  114.      */
  115.     private $calendarName null;
  116.     /**
  117.      * @var Documento[]|Collection
  118.      *
  119.      * @ORM\OneToMany(targetEntity=Documento::class, mappedBy="client")
  120.      */
  121.     private $documents;
  122.     public function __construct()
  123.     {
  124.         $this->services = new ArrayCollection();
  125.         $this->documents = new ArrayCollection();
  126.     }
  127.     public function __toString(): string
  128.     {
  129.         return $this->getName();
  130.     }
  131.     /**
  132.      * @return int
  133.      */
  134.     public function getId(): int
  135.     {
  136.         return $this->id;
  137.     }
  138.     /**
  139.      * @return string
  140.      */
  141.     public function getName(): string
  142.     {
  143.         return $this->name;
  144.     }
  145.     /**
  146.      * @param string $name
  147.      * @return Cliente
  148.      */
  149.     public function setName(string $name): Cliente
  150.     {
  151.         $this->name $name;
  152.         return $this;
  153.     }
  154.     /**
  155.      * @return string
  156.      */
  157.     public function getLabel(): string
  158.     {
  159.         return $this->label;
  160.     }
  161.     /**
  162.      * @param string $label
  163.      * @return Cliente
  164.      */
  165.     public function setLabel(string $label): Cliente
  166.     {
  167.         $this->label $label;
  168.         return $this;
  169.     }
  170.     /**
  171.      * @return string
  172.      */
  173.     public function getAddress(): string
  174.     {
  175.         return $this->address;
  176.     }
  177.     /**
  178.      * @param string $address
  179.      * @return Cliente
  180.      */
  181.     public function setAddress(string $address): Cliente
  182.     {
  183.         $this->address $address;
  184.         return $this;
  185.     }
  186.     /**
  187.      * @return string
  188.      */
  189.     public function getZip(): string
  190.     {
  191.         return $this->zip;
  192.     }
  193.     /**
  194.      * @param string $zip
  195.      * @return Cliente
  196.      */
  197.     public function setZip(string $zip): Cliente
  198.     {
  199.         $this->zip $zip;
  200.         return $this;
  201.     }
  202.     /**
  203.      * @return string
  204.      */
  205.     public function getCity(): string
  206.     {
  207.         return $this->city;
  208.     }
  209.     /**
  210.      * @param string $city
  211.      * @return Cliente
  212.      */
  213.     public function setCity(string $city): Cliente
  214.     {
  215.         $this->city $city;
  216.         return $this;
  217.     }
  218.     /**
  219.      * @return string
  220.      */
  221.     public function getState(): string
  222.     {
  223.         return $this->state;
  224.     }
  225.     /**
  226.      * @param string $state
  227.      * @return Cliente
  228.      */
  229.     public function setState(string $state): Cliente
  230.     {
  231.         $this->state $state;
  232.         return $this;
  233.     }
  234.     /**
  235.      * @return string
  236.      */
  237.     public function getCountry(): string
  238.     {
  239.         return $this->country;
  240.     }
  241.     /**
  242.      * @param string $country
  243.      * @return Cliente
  244.      */
  245.     public function setCountry(string $country): Cliente
  246.     {
  247.         $this->country $country;
  248.         return $this;
  249.     }
  250.     /**
  251.      * @return string
  252.      */
  253.     public function getFiscalId(): string
  254.     {
  255.         return $this->fiscalId;
  256.     }
  257.     /**
  258.      * @param string $fiscalId
  259.      * @return Cliente
  260.      */
  261.     public function setFiscalId(string $fiscalId): Cliente
  262.     {
  263.         $this->fiscalId $fiscalId;
  264.         return $this;
  265.     }
  266.     /**
  267.      * @return string
  268.      */
  269.     public function getVat(): string
  270.     {
  271.         return $this->vat;
  272.     }
  273.     /**
  274.      * @param string $vat
  275.      * @return Cliente
  276.      */
  277.     public function setVat(string $vat): Cliente
  278.     {
  279.         $this->vat $vat;
  280.         return $this;
  281.     }
  282.     /**
  283.      * @return string|null
  284.      */
  285.     public function getTelephone(): ?string
  286.     {
  287.         return $this->telephone;
  288.     }
  289.     /**
  290.      * @param string|null $telephone
  291.      * @return Cliente
  292.      */
  293.     public function setTelephone(?string $telephone): Cliente
  294.     {
  295.         $this->telephone $telephone;
  296.         return $this;
  297.     }
  298.     /**
  299.      * @return string|null
  300.      */
  301.     public function getEmail(): ?string
  302.     {
  303.         return $this->email;
  304.     }
  305.     /**
  306.      * @param string|null $email
  307.      * @return Cliente
  308.      */
  309.     public function setEmail(?string $email): Cliente
  310.     {
  311.         $this->email $email;
  312.         return $this;
  313.     }
  314.     /**
  315.      * @return string|null
  316.      */
  317.     public function getSite(): ?string
  318.     {
  319.         return $this->site;
  320.     }
  321.     /**
  322.      * @param string|null $site
  323.      * @return Cliente
  324.      */
  325.     public function setSite(?string $site): Cliente
  326.     {
  327.         $this->site $site;
  328.         return $this;
  329.     }
  330.     /**
  331.      * @return string|null
  332.      */
  333.     public function getContactUrl(): ?string
  334.     {
  335.         return $this->contactUrl;
  336.     }
  337.     /**
  338.      * @param string|null $contactUrl
  339.      * @return Cliente
  340.      */
  341.     public function setContactUrl(?string $contactUrl): Cliente
  342.     {
  343.         $this->contactUrl $contactUrl;
  344.         return $this;
  345.     }
  346.     /**
  347.      * @return Servizio[]|null
  348.      */
  349.     public function getServices(): ?array
  350.     {
  351.         return $this->services;
  352.     }
  353.     /**
  354.      * @param Servizio[]|null $services
  355.      * @return Cliente
  356.      */
  357.     public function setServices(?array $services): Cliente
  358.     {
  359.         $this->services $services;
  360.         return $this;
  361.     }
  362.     /**
  363.      * @return Progetto[]|null
  364.      */
  365.     public function getProjects(): ?array
  366.     {
  367.         return $this->projects;
  368.     }
  369.     /**
  370.      * @param Progetto[]|null $projects
  371.      * @return Cliente
  372.      */
  373.     public function setProjects(?array $projects): Cliente
  374.     {
  375.         $this->projects $projects;
  376.         return $this;
  377.     }
  378.     /**
  379.      * @return string|null
  380.      */
  381.     public function getCalendarName(): ?string
  382.     {
  383.         return $this->calendarName;
  384.     }
  385.     /**
  386.      * @param string|null $calendarName
  387.      * @return Cliente
  388.      */
  389.     public function setCalendarName(?string $calendarName): Cliente
  390.     {
  391.         $this->calendarName $calendarName;
  392.         return $this;
  393.     }
  394.     public function getDocuments(): Collection
  395.     {
  396.         return $this->documents;
  397.     }
  398.     public function setDocuments(Collection $documents): Cliente
  399.     {
  400.         $this->documents $documents;
  401.         return $this;
  402.     }
  403. }