src/Entity/Servizio.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Ramsey\Uuid\UuidInterface;
  5. use Ramsey\Uuid\Doctrine\UuidGenerator;
  6. /**
  7.  * @ORM\Entity
  8.  * @ORM\Table(name="servizi")
  9.  */
  10. class Servizio
  11. {
  12.     /**
  13.      * @var UuidInterface
  14.      *
  15.      * @ORM\Id
  16.      * @ORM\Column(type="uuid", unique=true)
  17.      * @ORM\GeneratedValue(strategy="CUSTOM")
  18.      * @ORM\CustomIdGenerator(class=UuidGenerator::class)
  19.      */
  20.     private $uid;
  21.     /**
  22.      * @var \DateTimeInterface|null
  23.      *
  24.      * @ORM\Column(type="datetime", nullable=true)
  25.      */
  26.     private $dstart;
  27.     /**
  28.      * @var \DateTimeInterface|null
  29.      *
  30.      * @ORM\Column(type="datetime", nullable=true)
  31.      */
  32.     private $dend;
  33.     /**
  34.      * @var integer
  35.      *
  36.      * @ORM\Column(type="integer")
  37.      */
  38.     private $duration;
  39.     /**
  40.      * @var Cliente|null
  41.      *
  42.      * @ORM\ManyToOne(targetEntity=Cliente::class, inversedBy="services")
  43.      */
  44.     private $client;
  45.     /**
  46.      * @var Progetto|null
  47.      *
  48.      * @ORM\ManyToOne(targetEntity=Progetto::class, inversedBy="services")
  49.      */
  50.     private $project;
  51.     /**
  52.      * @var string
  53.      *
  54.      * @ORM\Column(type="string")
  55.      */
  56.     private $title;
  57.     /**
  58.      * @var string
  59.      *
  60.      * @ORM\Column(type="text", nullable=true)
  61.      */
  62.     private $description;
  63.     /**
  64.      * @var string|null
  65.      *
  66.      * @ORM\Column(type="string", nullable=true, unique=true)
  67.      */
  68.     private $calendarUid null;
  69.     public function __toString(): string
  70.     {
  71.         // TODO: Implement __toString() method.
  72.         return $this->uid;
  73.     }
  74.     /**
  75.      * @return UuidInterface
  76.      */
  77.     public function getUid():? UuidInterface
  78.     {
  79.         return $this->uid;
  80.     }
  81.     /**
  82.      * @return \DateTimeInterface
  83.      */
  84.     public function getDstart():? \DateTimeInterface
  85.     {
  86.         return $this->dstart;
  87.     }
  88.     /**
  89.      * @param \DateTimeInterface $dstart
  90.      * @return Servizio
  91.      */
  92.     public function setDstart(? \DateTimeInterface $dstart): Servizio
  93.     {
  94.         $this->dstart $dstart;
  95.         return $this;
  96.     }
  97.     /**
  98.      * @return \DateTimeInterface
  99.      */
  100.     public function getDend():? \DateTimeInterface
  101.     {
  102.         return $this->dend;
  103.     }
  104.     /**
  105.      * @param \DateTimeInterface $dend
  106.      * @return Servizio
  107.      */
  108.     public function setDend(? \DateTimeInterface $dend): Servizio
  109.     {
  110.         $this->dend $dend;
  111.         return $this;
  112.     }
  113.     /**
  114.      * @return int
  115.      */
  116.     public function getDuration(): int
  117.     {
  118.         return $this->duration;
  119.     }
  120.     /**
  121.      * @param int $duration
  122.      * @return Servizio
  123.      */
  124.     public function setDuration(int $duration): Servizio
  125.     {
  126.         $this->duration $duration;
  127.         return $this;
  128.     }
  129.     /**
  130.      * @return string
  131.      */
  132.     public function getTitle(): string
  133.     {
  134.         return $this->title;
  135.     }
  136.     /**
  137.      * @param string $title
  138.      * @return Servizio
  139.      */
  140.     public function setTitle(string $title): Servizio
  141.     {
  142.         $this->title $title;
  143.         return $this;
  144.     }
  145.     /**
  146.      * @return string
  147.      */
  148.     public function getDescription(): string
  149.     {
  150.         return $this->description;
  151.     }
  152.     /**
  153.      * @param string $description
  154.      * @return Servizio
  155.      */
  156.     public function setDescription(string $description): Servizio
  157.     {
  158.         $this->description $description;
  159.         return $this;
  160.     }
  161.     /**
  162.      * @return Cliente
  163.      */
  164.     public function getClient(): ?Cliente
  165.     {
  166.         return $this->client;
  167.     }
  168.     /**
  169.      * @param Cliente $client
  170.      * @return Servizio
  171.      */
  172.     public function setClient(?Cliente $client): Servizio
  173.     {
  174.         $this->client $client;
  175.         return $this;
  176.     }
  177.     /**
  178.      * @return Progetto
  179.      */
  180.     public function getProject(): ?Progetto
  181.     {
  182.         return $this->project;
  183.     }
  184.     /**
  185.      * @param Progetto $project
  186.      * @return Servizio
  187.      */
  188.     public function setProject(?Progetto $project): Servizio
  189.     {
  190.         $this->project $project;
  191.         return $this;
  192.     }
  193.     /**
  194.      * @return string|null
  195.      */
  196.     public function getCalendarUid(): ?string
  197.     {
  198.         return $this->calendarUid;
  199.     }
  200.     /**
  201.      * @param string|null $calendarUid
  202.      * @return Servizio
  203.      */
  204.     public function setCalendarUid(?string $calendarUid): Servizio
  205.     {
  206.         $this->calendarUid $calendarUid;
  207.         return $this;
  208.     }
  209. }