src/Entity/OfficeLeave.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OfficeLeaveRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassOfficeLeaveRepository::class)]
  8. class OfficeLeave
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length128nullabletrue)]
  15.     private $AnnualDays;
  16.     #[ORM\Column(type'boolean'nullabletrue)]
  17.     private $isIncremental;
  18.     #[ORM\Column(type'integer'nullabletrue)]
  19.     private $IncrementalStart;
  20.     #[ORM\Column(type'integer'nullabletrue)]
  21.     private $incrementalValue;
  22.     #[ORM\Column(type'string'length128nullabletrue)]
  23.     private $sickDays;
  24.     #[ORM\OneToOne(targetEntityOffice::class, inversedBy'officeLeave'cascade: ['persist''remove'])]
  25.     #[ORM\JoinColumn(nullablefalse)]
  26.     private $office;
  27.     #[ORM\OneToMany(targetEntityOfficeAdditionalLeave::class, mappedBy'officeLeave')]
  28.     private $officeAdditionalLeaves;
  29.     public function __construct()
  30.     {
  31.         $this->officeAdditionalLeaves = new ArrayCollection();
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getAnnualDays(): ?string
  38.     {
  39.         return $this->AnnualDays;
  40.     }
  41.     public function setAnnualDays(string $AnnualDays): self
  42.     {
  43.         $this->AnnualDays $AnnualDays;
  44.         return $this;
  45.     }
  46.     public function getIsIncremental(): ?bool
  47.     {
  48.         return $this->isIncremental;
  49.     }
  50.     public function setIsIncremental(?bool $isIncremental): self
  51.     {
  52.         $this->isIncremental $isIncremental;
  53.         return $this;
  54.     }
  55.     public function getIncrementalStart(): ?int
  56.     {
  57.         return $this->IncrementalStart;
  58.     }
  59.     public function setIncrementalStart(?int $IncrementalStart): self
  60.     {
  61.         $this->IncrementalStart $IncrementalStart;
  62.         return $this;
  63.     }
  64.     public function getIncrementalValue(): ?int
  65.     {
  66.         return $this->incrementalValue;
  67.     }
  68.     public function setIncrementalValue(?int $incrementalValue): self
  69.     {
  70.         $this->incrementalValue $incrementalValue;
  71.         return $this;
  72.     }
  73.     public function getSickDays(): ?string
  74.     {
  75.         return $this->sickDays;
  76.     }
  77.     public function setSickDays(string $sickDays): self
  78.     {
  79.         $this->sickDays $sickDays;
  80.         return $this;
  81.     }
  82.     public function getOffice(): ?Office
  83.     {
  84.         return $this->office;
  85.     }
  86.     public function setOffice(Office $office): self
  87.     {
  88.         $this->office $office;
  89.         return $this;
  90.     }
  91.     /**
  92.      * @return Collection<int, OfficeAdditionalLeave>
  93.      */
  94.     public function getOfficeAdditionalLeaves(): Collection
  95.     {
  96.         return $this->officeAdditionalLeaves;
  97.     }
  98.     public function addOfficeAdditionalLeaves(OfficeAdditionalLeave $officeAdditionalLeaves): self
  99.     {
  100.         if (!$this->officeAdditionalLeaves->contains($officeAdditionalLeaves)) {
  101.             $this->officeAdditionalLeaves[] = $officeAdditionalLeaves;
  102.             $officeAdditionalLeaves->setOfficeLeave($this);
  103.         }
  104.         return $this;
  105.     }
  106.     public function removeOfficeAdditionalLeaves(OfficeAdditionalLeave $officeAdditionalLeaves): self
  107.     {
  108.         if ($this->officeAdditionalLeaves->removeElement($officeAdditionalLeaves)) {
  109.             // set the owning side to null (unless already changed)
  110.             if ($officeAdditionalLeaves->getOfficeLeave() === $this) {
  111.                 $officeAdditionalLeaves->setOfficeLeave(null);
  112.             }
  113.         }
  114.         return $this;
  115.     }
  116. }