src/Entity/RhPaySlip.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RhPaySlipRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. /**
  9.  * @ORM\Entity(repositoryClass=RhPaySlipRepository::class)
  10.  */
  11. class RhPaySlip
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity=Establishment::class, inversedBy="rhPaySlips")
  21.      * @ORM\JoinColumn(nullable=false)
  22.      */
  23.     private $establishment;
  24.     /**
  25.      * @ORM\Column(type="string", length=60)
  26.      */
  27.     private $code;
  28.     /**
  29.      * @ORM\Column(type="string", length=128)
  30.      */
  31.     private $label;
  32.     /**
  33.     * @ORM\Column(type="date_immutable", nullable=true)
  34.     * @Assert\NotBlank
  35.     */
  36.     private $date_start;
  37.     /**
  38.     * @ORM\Column(type="date_immutable", nullable=true)
  39.     * @Assert\GreaterThan(propertyPath="date_start")
  40.     */
  41.     private $date_end;
  42.     /**
  43.      * @ORM\Column(type="datetime_immutable")
  44.      */
  45.     private $created_at;
  46.     /**
  47.      * @ORM\Column(type="datetime_immutable")
  48.      */
  49.     private $updated_at;
  50.     /**
  51.      * @ORM\Column(type="integer")
  52.      */
  53.     private $created_by;
  54.     /**
  55.      * @ORM\Column(type="integer")
  56.      */
  57.     private $updated_by;
  58.     /**
  59.      * @ORM\OneToMany(targetEntity=RhSalaryPaySlip::class, mappedBy="rhPaySlip")
  60.      */
  61.     private $rhSalaryPaySlips;
  62.     /**
  63.      * @ORM\Column(type="string", length=16)
  64.     */
  65.     private $day;
  66.     /**
  67.      * @ORM\Column(type="string", length=10)
  68.     */
  69.     private $month;
  70.     /**
  71.      * @ORM\Column(type="string", length=6)
  72.     */
  73.     private $year;
  74.     /**
  75.      * @ORM\Column(type="text", nullable=true)
  76.      */
  77.     private $message_recipient;
  78.     /**
  79.      * @ORM\Column(type="string", length=255, nullable=true)
  80.     */
  81.     private $message_header;
  82.     /**
  83.      * @ORM\Column(type="text", nullable=true)
  84.      */
  85.     private $message;
  86.     /**
  87.      * @ORM\Column(type="text", nullable=true)
  88.      */
  89.     private $message_footer;
  90.     /**
  91.      * @ORM\Column(type="string", length=255, nullable=true)
  92.      */
  93.     private $message_location;
  94.     /**
  95.      * @ORM\Column(type="string", length=255, nullable=true)
  96.      */
  97.     private $message_signatory;
  98.     /**
  99.      * @ORM\Column(type="string", length=255, nullable=true)
  100.      */
  101.     private $message_signatory_title;
  102.     /**
  103.      * @ORM\Column(type="boolean")
  104.      */
  105.     private $is_validated;
  106.     /**
  107.      * @ORM\Column(type="boolean")
  108.      */
  109.     private $is_for_permanent;
  110.     public function __construct()
  111.     {
  112.         $this->rhSalaryPaySlips = new ArrayCollection();
  113.         $this->is_validated false;
  114.         $this->is_for_permanent false;
  115.     }
  116.     public function __toString()
  117.     {
  118.         return $this->getLabel();
  119.     }
  120.     
  121.     public function getId(): ?int
  122.     {
  123.         return $this->id;
  124.     }
  125.     public function getEstablishment(): ?Establishment
  126.     {
  127.         return $this->establishment;
  128.     }
  129.     public function setEstablishment(?Establishment $establishment): self
  130.     {
  131.         $this->establishment $establishment;
  132.         return $this;
  133.     }
  134.     public function getCode(): ?string
  135.     {
  136.         return $this->code;
  137.     }
  138.     public function setCode(string $code): self
  139.     {
  140.         $this->code $code;
  141.         return $this;
  142.     }
  143.     public function getLabel(): ?string
  144.     {
  145.         return $this->label;
  146.     }
  147.     public function setLabel(string $label): self
  148.     {
  149.         $this->label $label;
  150.         return $this;
  151.     }
  152.     public function getCreatedAt(): ?\DateTimeImmutable
  153.     {
  154.         return $this->created_at;
  155.     }
  156.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  157.     {
  158.         $this->created_at $created_at;
  159.         return $this;
  160.     }
  161.     public function getUpdatedAt(): ?\DateTimeImmutable
  162.     {
  163.         return $this->updated_at;
  164.     }
  165.     public function setUpdatedAt(\DateTimeImmutable $updated_at): self
  166.     {
  167.         $this->updated_at $updated_at;
  168.         return $this;
  169.     }
  170.     public function getCreatedBy(): ?int
  171.     {
  172.         return $this->created_by;
  173.     }
  174.     public function setCreatedBy(int $created_by): self
  175.     {
  176.         $this->created_by $created_by;
  177.         return $this;
  178.     }
  179.     public function getUpdatedBy(): ?int
  180.     {
  181.         return $this->updated_by;
  182.     }
  183.     public function setUpdatedBy(int $updated_by): self
  184.     {
  185.         $this->updated_by $updated_by;
  186.         return $this;
  187.     }
  188.     /**
  189.      * @return Collection|RhSalaryPaySlip[]
  190.      */
  191.     public function getRhSalaryPaySlips(): Collection
  192.     {
  193.         return $this->rhSalaryPaySlips;
  194.     }
  195.     public function addRhSalaryPaySlip(RhSalaryPaySlip $rhSalaryPaySlip): self
  196.     {
  197.         if (!$this->rhSalaryPaySlips->contains($rhSalaryPaySlip)) {
  198.             $this->rhSalaryPaySlips[] = $rhSalaryPaySlip;
  199.             $rhSalaryPaySlip->setRhPaySlip($this);
  200.         }
  201.         return $this;
  202.     }
  203.     public function removeRhSalaryPaySlip(RhSalaryPaySlip $rhSalaryPaySlip): self
  204.     {
  205.         if ($this->rhSalaryPaySlips->removeElement($rhSalaryPaySlip)) {
  206.             // set the owning side to null (unless already changed)
  207.             if ($rhSalaryPaySlip->getRhPaySlip() === $this) {
  208.                 $rhSalaryPaySlip->setRhPaySlip(null);
  209.             }
  210.         }
  211.         return $this;
  212.     }
  213.     public function getDay(): ?string
  214.     {
  215.         return $this->day;
  216.     }
  217.     public function setDay(string $day): self
  218.     {
  219.         $this->day $day;
  220.         return $this;
  221.     }
  222.     public function getMonth(): ?string
  223.     {
  224.         return $this->month;
  225.     }
  226.     public function setMonth(string $month): self
  227.     {
  228.         $this->month $month;
  229.         return $this;
  230.     }
  231.     public function getYear(): ?string
  232.     {
  233.         return $this->year;
  234.     }
  235.     public function setYear(string $year): self
  236.     {
  237.         $this->year $year;
  238.         return $this;
  239.     }
  240.     public function getDateStart(): ?\DateTimeImmutable
  241.     {
  242.         return $this->date_start;
  243.     }
  244.     public function setDateStart(?\DateTimeImmutable $date_start): self
  245.     {
  246.         $this->date_start $date_start;
  247.         return $this;
  248.     }
  249.     public function getDateEnd(): ?\DateTimeImmutable
  250.     {
  251.         return $this->date_end;
  252.     }
  253.     public function setDateEnd(?\DateTimeImmutable $date_end): self
  254.     {
  255.         $this->date_end $date_end;
  256.         return $this;
  257.     }
  258.     public function getMessageRecipient(): ?string
  259.     {
  260.         return $this->message_recipient;
  261.     }
  262.     public function setMessageRecipient(?string $message_recipient): self
  263.     {
  264.         $this->message_recipient $message_recipient;
  265.         return $this;
  266.     }
  267.     public function getMessageHeader(): ?string
  268.     {
  269.         return $this->message_header;
  270.     }
  271.     public function setMessageHeader(?string $message_header): self
  272.     {
  273.         $this->message_header $message_header;
  274.         return $this;
  275.     }
  276.     public function getMessage(): ?string
  277.     {
  278.         return $this->message;
  279.     }
  280.     public function setMessage(?string $message): self
  281.     {
  282.         $this->message $message;
  283.         return $this;
  284.     }
  285.     public function getMessageFooter(): ?string
  286.     {
  287.         return $this->message_footer;
  288.     }
  289.     public function setMessageFooter(?string $message_footer): self
  290.     {
  291.         $this->message_footer $message_footer;
  292.         return $this;
  293.     }
  294.     public function getMessageLocation(): ?string
  295.     {
  296.         return $this->message_location;
  297.     }
  298.     public function setMessageLocation(?string $message_location): self
  299.     {
  300.         $this->message_location $message_location;
  301.         return $this;
  302.     }
  303.     public function getMessageSignatory(): ?string
  304.     {
  305.         return $this->message_signatory;
  306.     }
  307.     public function setMessageSignatory(?string $message_signatory): self
  308.     {
  309.         $this->message_signatory $message_signatory;
  310.         return $this;
  311.     }
  312.     public function getMessageSignatoryTitle(): ?string
  313.     {
  314.         return $this->message_signatory_title;
  315.     }
  316.     public function setMessageSignatoryTitle(?string $message_signatory_title): self
  317.     {
  318.         $this->message_signatory_title $message_signatory_title;
  319.         return $this;
  320.     }
  321.     public function getIsValidated(): ?bool
  322.     {
  323.         return $this->is_validated;
  324.     }
  325.     public function setIsValidated(bool $is_validated): self
  326.     {
  327.         $this->is_validated $is_validated;
  328.         return $this;
  329.     }
  330.     public function getIsForPermanent(): ?bool
  331.     {
  332.         return $this->is_for_permanent;
  333.     }
  334.     public function setIsForPermanent(bool $is_for_permanent): self
  335.     {
  336.         $this->is_for_permanent $is_for_permanent;
  337.         return $this;
  338.     }
  339. }