src/Entity/Slave/UserHoliday.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Slave;
  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.  * @ORM\Table(name="eposm_s_user_holiday")
  9.  * @ORM\Entity
  10.  */
  11. class UserHoliday
  12. {    
  13.     /**
  14.      * @ORM\Column(name="id", type="bigint")
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue(strategy="AUTO")
  17.      */
  18.     protected $id;
  19.     /**
  20.      * @ORM\Column(name="date_from", type="date", nullable=true)
  21.      */
  22.     protected $dateFrom;
  23.     /**
  24.      * @ORM\Column(name="date_to", type="date", nullable=true)
  25.      */
  26.     protected $dateTo;
  27.     // ManyToOne
  28.         /**
  29.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\User", inversedBy="holidays")
  30.          * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  31.          */
  32.         private $user;
  33.         /**
  34.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\User", inversedBy="substitutions")
  35.          * @ORM\JoinColumn(name="substitute_id", referencedColumnName="id")
  36.          */
  37.         private $substitute;
  38.         public function getId(): ?string
  39.         {
  40.             return $this->id;
  41.         }
  42.         public function getDateFrom(): ?\DateTimeInterface
  43.         {
  44.             return $this->dateFrom;
  45.         }
  46.         public function setDateFrom(?\DateTimeInterface $dateFrom): static
  47.         {
  48.             $this->dateFrom $dateFrom;
  49.             return $this;
  50.         }
  51.         public function getDateTo(): ?\DateTimeInterface
  52.         {
  53.             return $this->dateTo;
  54.         }
  55.         public function setDateTo(?\DateTimeInterface $dateTo): static
  56.         {
  57.             $this->dateTo $dateTo;
  58.             return $this;
  59.         }
  60.         public function getUser(): ?User
  61.         {
  62.             return $this->user;
  63.         }
  64.         public function setUser(?User $user): static
  65.         {
  66.             $this->user $user;
  67.             return $this;
  68.         }
  69.         public function getSubstitute(): ?User
  70.         {
  71.             return $this->substitute;
  72.         }
  73.         public function setSubstitute(?User $substitute): static
  74.         {
  75.             $this->substitute $substitute;
  76.             return $this;
  77.         }
  78. }