<?php
namespace App\Entity;
use App\Repository\RhPaySlipRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=RhPaySlipRepository::class)
*/
class RhPaySlip
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Establishment::class, inversedBy="rhPaySlips")
* @ORM\JoinColumn(nullable=false)
*/
private $establishment;
/**
* @ORM\Column(type="string", length=60)
*/
private $code;
/**
* @ORM\Column(type="string", length=128)
*/
private $label;
/**
* @ORM\Column(type="date_immutable", nullable=true)
* @Assert\NotBlank
*/
private $date_start;
/**
* @ORM\Column(type="date_immutable", nullable=true)
* @Assert\GreaterThan(propertyPath="date_start")
*/
private $date_end;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $created_at;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $updated_at;
/**
* @ORM\Column(type="integer")
*/
private $created_by;
/**
* @ORM\Column(type="integer")
*/
private $updated_by;
/**
* @ORM\OneToMany(targetEntity=RhSalaryPaySlip::class, mappedBy="rhPaySlip")
*/
private $rhSalaryPaySlips;
/**
* @ORM\Column(type="string", length=16)
*/
private $day;
/**
* @ORM\Column(type="string", length=10)
*/
private $month;
/**
* @ORM\Column(type="string", length=6)
*/
private $year;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $message_recipient;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $message_header;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $message;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $message_footer;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $message_location;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $message_signatory;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $message_signatory_title;
/**
* @ORM\Column(type="boolean")
*/
private $is_validated;
/**
* @ORM\Column(type="boolean")
*/
private $is_for_permanent;
public function __construct()
{
$this->rhSalaryPaySlips = new ArrayCollection();
$this->is_validated = false;
$this->is_for_permanent = false;
}
public function __toString()
{
return $this->getLabel();
}
public function getId(): ?int
{
return $this->id;
}
public function getEstablishment(): ?Establishment
{
return $this->establishment;
}
public function setEstablishment(?Establishment $establishment): self
{
$this->establishment = $establishment;
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(string $code): self
{
$this->code = $code;
return $this;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): self
{
$this->label = $label;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeImmutable $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updated_at;
}
public function setUpdatedAt(\DateTimeImmutable $updated_at): self
{
$this->updated_at = $updated_at;
return $this;
}
public function getCreatedBy(): ?int
{
return $this->created_by;
}
public function setCreatedBy(int $created_by): self
{
$this->created_by = $created_by;
return $this;
}
public function getUpdatedBy(): ?int
{
return $this->updated_by;
}
public function setUpdatedBy(int $updated_by): self
{
$this->updated_by = $updated_by;
return $this;
}
/**
* @return Collection|RhSalaryPaySlip[]
*/
public function getRhSalaryPaySlips(): Collection
{
return $this->rhSalaryPaySlips;
}
public function addRhSalaryPaySlip(RhSalaryPaySlip $rhSalaryPaySlip): self
{
if (!$this->rhSalaryPaySlips->contains($rhSalaryPaySlip)) {
$this->rhSalaryPaySlips[] = $rhSalaryPaySlip;
$rhSalaryPaySlip->setRhPaySlip($this);
}
return $this;
}
public function removeRhSalaryPaySlip(RhSalaryPaySlip $rhSalaryPaySlip): self
{
if ($this->rhSalaryPaySlips->removeElement($rhSalaryPaySlip)) {
// set the owning side to null (unless already changed)
if ($rhSalaryPaySlip->getRhPaySlip() === $this) {
$rhSalaryPaySlip->setRhPaySlip(null);
}
}
return $this;
}
public function getDay(): ?string
{
return $this->day;
}
public function setDay(string $day): self
{
$this->day = $day;
return $this;
}
public function getMonth(): ?string
{
return $this->month;
}
public function setMonth(string $month): self
{
$this->month = $month;
return $this;
}
public function getYear(): ?string
{
return $this->year;
}
public function setYear(string $year): self
{
$this->year = $year;
return $this;
}
public function getDateStart(): ?\DateTimeImmutable
{
return $this->date_start;
}
public function setDateStart(?\DateTimeImmutable $date_start): self
{
$this->date_start = $date_start;
return $this;
}
public function getDateEnd(): ?\DateTimeImmutable
{
return $this->date_end;
}
public function setDateEnd(?\DateTimeImmutable $date_end): self
{
$this->date_end = $date_end;
return $this;
}
public function getMessageRecipient(): ?string
{
return $this->message_recipient;
}
public function setMessageRecipient(?string $message_recipient): self
{
$this->message_recipient = $message_recipient;
return $this;
}
public function getMessageHeader(): ?string
{
return $this->message_header;
}
public function setMessageHeader(?string $message_header): self
{
$this->message_header = $message_header;
return $this;
}
public function getMessage(): ?string
{
return $this->message;
}
public function setMessage(?string $message): self
{
$this->message = $message;
return $this;
}
public function getMessageFooter(): ?string
{
return $this->message_footer;
}
public function setMessageFooter(?string $message_footer): self
{
$this->message_footer = $message_footer;
return $this;
}
public function getMessageLocation(): ?string
{
return $this->message_location;
}
public function setMessageLocation(?string $message_location): self
{
$this->message_location = $message_location;
return $this;
}
public function getMessageSignatory(): ?string
{
return $this->message_signatory;
}
public function setMessageSignatory(?string $message_signatory): self
{
$this->message_signatory = $message_signatory;
return $this;
}
public function getMessageSignatoryTitle(): ?string
{
return $this->message_signatory_title;
}
public function setMessageSignatoryTitle(?string $message_signatory_title): self
{
$this->message_signatory_title = $message_signatory_title;
return $this;
}
public function getIsValidated(): ?bool
{
return $this->is_validated;
}
public function setIsValidated(bool $is_validated): self
{
$this->is_validated = $is_validated;
return $this;
}
public function getIsForPermanent(): ?bool
{
return $this->is_for_permanent;
}
public function setIsForPermanent(bool $is_for_permanent): self
{
$this->is_for_permanent = $is_for_permanent;
return $this;
}
}