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.     //
  39.     public function getId(): ?string
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getDateFrom(): ?\DateTimeInterface
  44.     {
  45.         return $this->dateFrom;
  46.     }
  47.     public function setDateFrom(?\DateTimeInterface $dateFrom): static
  48.     {
  49.         $this->dateFrom $dateFrom;
  50.         return $this;
  51.     }
  52.     public function getDateTo(): ?\DateTimeInterface
  53.     {
  54.         return $this->dateTo;
  55.     }
  56.     public function setDateTo(?\DateTimeInterface $dateTo): static
  57.     {
  58.         $this->dateTo $dateTo;
  59.         return $this;
  60.     }
  61.     public function getUser(): ?User
  62.     {
  63.         return $this->user;
  64.     }
  65.     public function setUser(?User $user): static
  66.     {
  67.         $this->user $user;
  68.         return $this;
  69.     }
  70.     public function getSubstitute(): ?User
  71.     {
  72.         return $this->substitute;
  73.     }
  74.     public function setSubstitute(?User $substitute): static
  75.     {
  76.         $this->substitute $substitute;
  77.         return $this;
  78.     }
  79. }