src/Entity/LeaveEntitlement.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LeaveEntitlementRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassLeaveEntitlementRepository::class)]
  9. class LeaveEntitlement
  10. {
  11.     #[Groups(['LogService'])]
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column(type'integer')]
  15.     private $id;
  16.     #[Groups(['LogService'])]
  17.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'leaveEntitlements')]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private $user;
  20.     #[Groups(['LogService'])]
  21.     #[ORM\Column(type'string'length4nullabletrue)]
  22.     private $year;
  23.     #[Groups(['LogService'])]
  24.     #[ORM\Column(type'datetime'nullabletrue)]
  25.     private $expiredAt;
  26.     #[Groups(['LogService'])]
  27.     #[ORM\Column(type'decimal'precision4scale1nullabletrue)]
  28.     private $leaveEntitlements;
  29.     #[Groups(['LogService'])]
  30.     #[ORM\Column(type'decimal'precision4scale1nullabletrue)]
  31.     private $leaveApproved;
  32.     #[Groups(['LogService'])]
  33.     #[ORM\Column(type'decimal'precision4scale1nullabletrue)]
  34.     private $leaveLeft;
  35.     #[Groups(['LogService'])]
  36.     #[ORM\Column(type'decimal'precision4scale1nullabletrue)]
  37.     private $sickEntitlements;
  38.     #[Groups(['LogService'])]
  39.     #[ORM\Column(type'datetime'nullabletrue)]
  40.     private $createdAt;
  41.     #[Groups(['LogService'])]
  42.     #[ORM\Column(type'datetime'nullabletrue)]
  43.     private $updatedAt;
  44.     #[Groups(['LogService'])]
  45.     #[ORM\Column(type'integer'nullabletrue)]
  46.     private $sickJustified;
  47.     #[Groups(['LogService'])]
  48.     #[ORM\Column(type'integer'nullabletrue)]
  49.     private $sickLeft;
  50.     #[Groups(['LogService'])]
  51.     #[ORM\Column(type'text'nullabletrue)]
  52.     private $comment;
  53.     #[Groups(['LogService'])]
  54.     #[ORM\ManyToOne(targetEntityUser::class)]
  55.     #[ORM\JoinColumn(nullablefalse)]
  56.     private $createdBy;
  57.     #[ORM\OneToMany(targetEntityLeaveAdditional::class, mappedBy'leaveEntitlement')]
  58.     private $leaveAdditionals;
  59.     #[ORM\Column(type'boolean'nullabletrue)]
  60.     private $isIncremental;
  61.     #[ORM\Column(type'integer'nullabletrue)]
  62.     private $incrementalStart;
  63.     #[ORM\Column(type'integer'nullabletrue)]
  64.     private $incrementalValue;
  65.     #[ORM\Column(type'integer'nullabletrue)]
  66.     private $annualDays;
  67.     #[ORM\Column(type'boolean'nullabletrue)]
  68.     private $isActive;
  69.     #[ORM\ManyToOne(targetEntityLeaveType::class, inversedBy'leaveEntitlements')]
  70.     private $leaveType;
  71.     #[ORM\Column(type'json'nullabletrue)]
  72.     private $attributes = [];
  73.     #[ORM\Column(type'text'nullabletrue)]
  74.     private $notes;
  75.     #[ORM\Column(type'integer'nullabletrue)]
  76.     private $parent;
  77.     #[ORM\Column(type'json'nullabletrue)]
  78.     private $log = [];
  79.     public function __construct()
  80.     {
  81.         $this->leaveAdditionals = new ArrayCollection();
  82.     }
  83.     public function getId(): ?int
  84.     {
  85.         return $this->id;
  86.     }
  87.     public function getUser(): ?User
  88.     {
  89.         return $this->user;
  90.     }
  91.     public function setUser(?User $user): self
  92.     {
  93.         $this->user $user;
  94.         return $this;
  95.     }
  96.     public function getYear(): ?string
  97.     {
  98.         return $this->year;
  99.     }
  100.     public function setYear(string $year): self
  101.     {
  102.         $this->year $year;
  103.         return $this;
  104.     }
  105.     public function getExpiredAt(): ?\DateTime
  106.     {
  107.         return $this->expiredAt;
  108.     }
  109.     public function setExpiredAt(\DateTime $expiredAt): self
  110.     {
  111.         $this->expiredAt $expiredAt;
  112.         return $this;
  113.     }
  114.     public function getLeaveEntitlements(): ?string
  115.     {
  116.         return $this->leaveEntitlements;
  117.     }
  118.     public function setLeaveEntitlements(?string $leaveEntitlements): self
  119.     {
  120.         $this->leaveEntitlements $leaveEntitlements;
  121.         return $this;
  122.     }
  123.     public function getLeaveApproved(): ?string
  124.     {
  125.         return $this->leaveApproved;
  126.     }
  127.     public function setLeaveApproved(?string $leaveApproved): self
  128.     {
  129.         $this->leaveApproved $leaveApproved;
  130.         return $this;
  131.     }
  132.     public function getLeaveLeft(): ?string
  133.     {
  134.         return $this->leaveLeft;
  135.     }
  136.     public function setLeaveLeft(?string $leaveLeft): self
  137.     {
  138.         $this->leaveLeft $leaveLeft;
  139.         return $this;
  140.     }
  141.     public function getsickEntitlements(): ?int
  142.     {
  143.         return $this->sickEntitlements;
  144.     }
  145.     public function setsickEntitlements(?int $sickEntitlements): self
  146.     {
  147.         $this->sickEntitlements $sickEntitlements;
  148.         return $this;
  149.     }
  150.     public function getCreatedAt(): ?\DateTime
  151.     {
  152.         return $this->createdAt;
  153.     }
  154.     public function setCreatedAt(\DateTime $createdAt): self
  155.     {
  156.         $this->createdAt $createdAt;
  157.         return $this;
  158.     }
  159.     public function getUpdatedAt(): ?\DateTime
  160.     {
  161.         return $this->updatedAt;
  162.     }
  163.     public function setUpdatedAt(?\DateTime $updatedAt): self
  164.     {
  165.         $this->updatedAt $updatedAt;
  166.         return $this;
  167.     }
  168.     public function getsickJustified(): ?int
  169.     {
  170.         return $this->sickJustified;
  171.     }
  172.     public function setsickJustified(?int $sickJustified): self
  173.     {
  174.         $this->sickJustified $sickJustified;
  175.         return $this;
  176.     }
  177.     public function getsickLeft(): ?int
  178.     {
  179.         return $this->sickLeft;
  180.     }
  181.     public function setsickLeft(?int $sickLeft): self
  182.     {
  183.         $this->sickLeft $sickLeft;
  184.         return $this;
  185.     }
  186.     public function getComment(): ?string
  187.     {
  188.         return $this->comment;
  189.     }
  190.     public function setComment(?string $comment): self
  191.     {
  192.         $this->comment $comment;
  193.         return $this;
  194.     }
  195.     public function getCreatedBy(): ?User
  196.     {
  197.         return $this->createdBy;
  198.     }
  199.     public function setCreatedBy(?User $createdBy): self
  200.     {
  201.         $this->createdBy $createdBy;
  202.         return $this;
  203.     }
  204.     public function getParent(): ?int
  205.     {
  206.         return $this->parent;
  207.     }
  208.     public function setParent(?int $parent): self
  209.     {
  210.         $this->parent $parent;
  211.         return $this;
  212.     }
  213.     /**
  214.      * @return Collection<int, LeaveAdditional>
  215.      */
  216.     public function getLeaveAdditionals(): Collection
  217.     {
  218.         return $this->leaveAdditionals;
  219.     }
  220.     public function addLeaveAdditional(LeaveAdditional $leaveAdditional): self
  221.     {
  222.         if (!$this->leaveAdditionals->contains($leaveAdditional)) {
  223.             $this->leaveAdditionals[] = $leaveAdditional;
  224.             $leaveAdditional->setLeaveEntitlement($this);
  225.         }
  226.         return $this;
  227.     }
  228.     public function removeLeaveAdditional(LeaveAdditional $leaveAdditional): self
  229.     {
  230.         if ($this->leaveAdditionals->removeElement($leaveAdditional)) {
  231.             // set the owning side to null (unless already changed)
  232.             if ($leaveAdditional->getLeaveEntitlement() === $this) {
  233.                 $leaveAdditional->setLeaveEntitlement(null);
  234.             }
  235.         }
  236.         return $this;
  237.     }
  238.     public function getIsIncremental(): ?bool
  239.     {
  240.         return $this->isIncremental;
  241.     }
  242.     public function setIsIncremental(?bool $isIncremental): self
  243.     {
  244.         $this->isIncremental $isIncremental;
  245.         return $this;
  246.     }
  247.     public function getIncrementalStart(): ?int
  248.     {
  249.         return $this->incrementalStart;
  250.     }
  251.     public function setIncrementalStart(?int $incrementalStart): self
  252.     {
  253.         $this->incrementalStart $incrementalStart;
  254.         return $this;
  255.     }
  256.     public function getIncrementalValue(): ?int
  257.     {
  258.         return $this->incrementalValue;
  259.     }
  260.     public function setIncrementalValue(?int $incrementalValue): self
  261.     {
  262.         $this->incrementalValue $incrementalValue;
  263.         return $this;
  264.     }
  265.     public function getAnnualDays(): ?int
  266.     {
  267.         return $this->annualDays;
  268.     }
  269.     public function setAnnualDays(?int $annualDays): self
  270.     {
  271.         $this->annualDays $annualDays;
  272.         return $this;
  273.     }
  274.     public function getIsActive(): ?bool
  275.     {
  276.         return $this->isActive;
  277.     }
  278.     public function setIsActive(?bool $isActive): self
  279.     {
  280.         $this->isActive $isActive;
  281.         return $this;
  282.     }
  283.     public function getLeaveType(): ?LeaveType
  284.     {
  285.         return $this->leaveType;
  286.     }
  287.     public function setLeaveType(?LeaveType $leaveType): self
  288.     {
  289.         $this->leaveType $leaveType;
  290.         return $this;
  291.     }
  292.     public function getAttributes(): ?array
  293.     {
  294.         return $this->attributes;
  295.     }
  296.     public function setAttributes(?array $attributes): self
  297.     {
  298.         $this->attributes $attributes;
  299.         return $this;
  300.     }
  301.     public function getNotes(): ?string
  302.     {
  303.         return $this->notes;
  304.     }
  305.     public function setNotes(?string $notes): self
  306.     {
  307.         $this->notes $notes;
  308.         return $this;
  309.     }
  310.     public function getLog(): ?array
  311.     {
  312.         return $this->log;
  313.     }
  314.     public function setLog(?array $log): self
  315.     {
  316.         $this->log $log;
  317.         return $this;
  318.     }
  319. }