src/Entity/StaffProfile.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StaffProfileRepository;
  4. use Doctrine\Common\Collections\{ArrayCollectionCollection};
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. #[ORM\Entity(repositoryClassStaffProfileRepository::class), ORM\Table(name'staff_profiles')]
  9. class StaffProfile implements \Stringable
  10. {
  11.     #[ORM\IdORM\GeneratedValueORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length100), Assert\NotBlank]
  14.     #[Assert\Regex(pattern'/^[a-zA-Z]+$/i'message'Your first name cannot contain a number')]
  15.     #[Assert\Length(
  16.         min2,
  17.         max15,
  18.         minMessage'Your first name must be at least {{ limit }} characters long',
  19.         maxMessage'Your first name cannot be longer than {{ limit }} characters'
  20.     )]
  21.     private $firstName;
  22.     #[ORM\Column(type'string'length100), Assert\NotBlank]
  23.     #[Assert\Regex(pattern'/^[a-zA-Z]+$/i'message'Your last name cannot contain a number')]
  24.     #[Assert\Length(
  25.         min2,
  26.         max15,
  27.         minMessage'Your last name must be at least {{ limit }} characters long',
  28.         maxMessage'Your last name cannot be longer than {{ limit }} characters'
  29.     )]
  30.     private $lastName;
  31.     #[ORM\Column(type'string'length100), Assert\NotBlank]
  32.     #[Assert\Regex(pattern'/^[a-zA-Z ]+$/i'message'Your father name cannot contain a number')]
  33.     #[Assert\Length(
  34.         min1,
  35.         max15,
  36.         minMessage'Your father name must be at least {{ limit }} characters long',
  37.         maxMessage'Your father name cannot be longer than {{ limit }} characters'
  38.     )]
  39.     private $fatherName;
  40.     #[ORM\Column(type'string'length100nullabletrue)]
  41.     #[Assert\Regex(pattern'/^[a-zA-Z ]+$/i'message'Your mother name cannot contain a number')]
  42.     #[Assert\Length(
  43.         min2,
  44.         max15,
  45.         minMessage'Your mother name must be at least {{ limit }} characters long',
  46.         maxMessage'Your mother name cannot be longer than {{ limit }} characters'
  47.     )]
  48.     private $motherName;
  49.     #[ORM\Column(type'string'columnDefinition"enum('Male', 'Female', 'Other')"), Assert\NotBlank]
  50.     private $gender;
  51.     #[ORM\Column(type'string'length100)]
  52.     private $photo;
  53.     #[ORM\Column(type'text'), Assert\NotBlank]
  54.     private $localAddress;
  55.     #[ORM\Column(type'text'), Assert\NotBlank]
  56.     private $permanentAddress;
  57.     #[ORM\Column(type'date'), Assert\NotBlank]
  58.     private $dob;
  59.     #[ORM\Column(type'date'nullabletrue)]
  60.     private $dor;
  61.     #[ORM\Column(type'integer'nullabletrue)]
  62.     private $email_otp_verify;
  63.     #[ORM\Column(type'integer'nullabletrue)]
  64.     private $mobile_otp_verify;
  65.     #[ORM\Column(type'string'length12)]
  66.     #[Assert\Regex(pattern'/^[0-9]*$/'message'Aadhaar number must be in positive number')]
  67.     #[Assert\Length(min12max12exactMessage'Aadhaar number must be of {{ limit }} characters.')]
  68.     private $adharNum;
  69.     #[ORM\Column(type'string'length10)]
  70.     #[Assert\Length(min10max10exactMessage'PAN Number must be of {{ limit }} characters.')]
  71.     private $panNum;
  72.     #[ORM\Column(type'string'length190), Assert\Email]
  73.     private $email;
  74.     #[ORM\Column(type'string'length190), Assert\Email]
  75.     private $temp_email;
  76.     #[Assert\Regex(pattern'/^[0-9]*$/')]
  77.     #[ORM\Column(type'string'length10nullabletrue)]
  78.     private $temp_mobile_no;
  79.     #[ORM\Column(type'integer'length6nullabletrue)]
  80.     private $email_otp;
  81.     #[ORM\Column(type'string'length10), Assert\NotBlank]
  82.     #[Assert\Regex(pattern'/^[0-9]*$/'message'Mobile number must be in positive number')]
  83.     private $mobile;
  84.     #[ORM\Column(type'integer'length6nullabletrue)]
  85.     private $mobile_otp;
  86.     #[ORM\Column(type'string'length15nullabletrue)]
  87.     private $empSenNum;
  88.     #[ORM\Column(type'string'length50nullabletrue)]
  89.     private $gpfCpfNum;
  90.     #[ORM\Column(type'string'length50nullabletrue)]
  91.     private $contractNum;
  92.     #[ORM\Column(type'string'length50nullabletrue)]
  93.     private $is_update;
  94.     /* #[ORM\Column(type: 'string', columnDefinition: "enum('General', 'ST', 'SC', 'OBC', 'SEBC', 'Nt-b', 'Nt-d')")]
  95.     #[Assert\NotBlank]
  96.     private $castCategory; */
  97.     #[ORM\Column(type'string'columnDefinition"enum('None', 'ST', 'SC', 'PH', 'Women', 'Ex-Army')"), Assert\NotBlank]
  98.     private $quotaType;
  99.     #[ORM\Column(type'string'columnDefinition"enum('Permanent', 'Contractual', 'Temporary', 'Outsourced')")]
  100.     #[Assert\NotBlank]
  101.     private $jobType;
  102.     #[ORM\Column(type'string'length50), Assert\NotBlank]
  103.     #[Assert\Length(
  104.         min3,
  105.         max25,
  106.         minMessage'Bank name must be at least {{ limit }} characters long',
  107.         maxMessage'Bank name cannot be longer than {{ limit }} characters'
  108.     )]
  109.     #[Assert\Regex(pattern'/^[A-Za-z ]+$/i'message'Bank name invalid format.')]
  110.     private $bankName;
  111.     #[ORM\Column(type'string'length50), Assert\NotBlank]
  112.     #[Assert\Length(
  113.         min3,
  114.         max30,
  115.         minMessage'Bank Branch name must be at least {{ limit }} characters long',
  116.         maxMessage'Bank Branch name cannot be longer than {{ limit }} characters'
  117.     )]
  118.     #[Assert\Regex(pattern'/^[A-Za-z ]/'message'Branch name invalid format.')]
  119.     private $bankBranch;
  120.     #[ORM\Column(type'text'nullabletrue)]
  121.     private $bankBranchAddress;
  122.     #[ORM\Column(type'string'length50), Assert\NotBlank]
  123.     #[Assert\Length(
  124.         min6,
  125.         max25,
  126.         minMessage'Account no. must be at least {{ limit }} number long',
  127.         maxMessage'Account no. cannot be longer than {{ limit }} number'
  128.     )]
  129.     #[Assert\Regex(pattern'/^[0-9]*$/'message'Account number must be in positive number')]
  130.     private $bankAccount;
  131.     #[ORM\Column(type'string'length25), Assert\NotBlank]
  132.     private $bankIfsCode;
  133.     #[ORM\OneToOne(targetEntityUser::class, mappedBy'profile'cascade: ['persist''remove'])]
  134.     private $user;
  135.     #[ORM\ManyToOne(targetEntityHospital::class), ORM\JoinColumn(nullablefalse)]
  136.     private $hospital;
  137.     #[ORM\ManyToOne(targetEntityDoctorCategory::class)]
  138.     private $doctorCategory;
  139.     #[ORM\ManyToOne(targetEntityWard::class)]
  140.     private $ward;
  141.     #[ORM\ManyToOne(targetEntityDesignationSetting::class)]
  142.     #[ORM\JoinColumn(name'designation_setting_id'nullablefalse), Assert\NotBlank]
  143.     private $designation;
  144.     #[ORM\Column(type'string'length50nullabletrue)]
  145.     private $regNum;
  146.     #[Gedmo\Timestampable(on'create'), ORM\Column(type'datetime')]
  147.     private $createdAt;
  148.     #[Gedmo\Timestampable(on'create'), ORM\Column(type'datetime')]
  149.     private $updatedAt;
  150.     #[ORM\OneToMany(targetEntityStaffServiceOrder::class, mappedBy'profile'orphanRemovaltrue)]
  151.     private $serviceOrders;
  152.     #[ORM\OneToMany(targetEntityStaffEducation::class, mappedBy'profile'orphanRemovaltrue)]
  153.     private $education;
  154.     #[ORM\OneToMany(targetEntityStaffFamilyMember::class, mappedBy'profile'orphanRemovaltrue)]
  155.     private $familyMembers;
  156.     #[ORM\OneToMany(targetEntityStaffWorkExperience::class, mappedBy'profile'orphanRemovaltrue)]
  157.     private $workExperiences;
  158.     #[ORM\OneToMany(targetEntityStaffTraining::class, mappedBy'profile'orphanRemovaltrue)]
  159.     private $trainings;
  160.     #[ORM\OneToMany(targetEntityStaffSalaryHistory::class, mappedBy'profile'orphanRemovaltrue)]
  161.     private $salaryHistories;
  162.     #[ORM\OneToMany(targetEntityStaffDeputation::class, mappedBy'profile'orphanRemovaltrue)]
  163.     private $deputations;
  164.     #[ORM\OneToMany(targetEntityStaffComplaint::class, mappedBy'profile'orphanRemovaltrue)]
  165.     private $complaints;
  166.     #[ORM\OneToMany(targetEntityStaffLeaveAllotment::class, mappedBy'profile'orphanRemovaltrue)]
  167.     private $leaveAllotments;
  168.     public function __construct()
  169.     {
  170.         $this->serviceOrders = new ArrayCollection();
  171.         $this->education = new ArrayCollection();
  172.         $this->familyMembers = new ArrayCollection();
  173.         $this->workExperiences = new ArrayCollection();
  174.         $this->trainings = new ArrayCollection();
  175.         $this->salaryHistories = new ArrayCollection();
  176.         $this->deputations = new ArrayCollection();
  177.         $this->complaints = new ArrayCollection();
  178.         $this->leaveAllotments = new ArrayCollection();
  179.     }
  180.     public function getId(): ?int
  181.     {
  182.         return $this->id;
  183.     }
  184.     public function getFirstName(): ?string
  185.     {
  186.         return $this->firstName;
  187.     }
  188.     public function setFirstName(string $firstName): self
  189.     {
  190.         $this->firstName strip_tags($firstName);
  191.         return $this;
  192.     }
  193.     public function getLastName(): ?string
  194.     {
  195.         return $this->lastName;
  196.     }
  197.     public function setLastName(string $lastName): self
  198.     {
  199.         $this->lastName strip_tags($lastName);
  200.         return $this;
  201.     }
  202.     public function getFatherName(): ?string
  203.     {
  204.         return $this->fatherName;
  205.     }
  206.     public function setFatherName(string $fatherName): self
  207.     {
  208.         $this->fatherName strip_tags($fatherName);
  209.         return $this;
  210.     }
  211.     public function getMotherName(): ?string
  212.     {
  213.         return $this->motherName;
  214.     }
  215.     public function setMotherName(?string $motherName): self
  216.     {
  217.         $this->motherName strip_tags($motherName);
  218.         return $this;
  219.     }
  220.     public function getGender(): ?string
  221.     {
  222.         return $this->gender;
  223.     }
  224.     public function setGender(?string $gender): self
  225.     {
  226.         $this->gender $gender;
  227.         return $this;
  228.     }
  229.     public function getPhoto(): ?string
  230.     {
  231.         return $this->photo;
  232.     }
  233.     public function setPhoto(?string $photo): self
  234.     {
  235.         $this->photo $photo;
  236.         return $this;
  237.     }
  238.     public function getLocalAddress(): ?string
  239.     {
  240.         return $this->localAddress;
  241.     }
  242.     public function setLocalAddress(?string $localAddress): self
  243.     {
  244.         $this->localAddress strip_tags($localAddress);
  245.         return $this;
  246.     }
  247.     public function getPermanentAddress(): ?string
  248.     {
  249.         return $this->permanentAddress;
  250.     }
  251.     public function setPermanentAddress(?string $permanentAddress): self
  252.     {
  253.         $this->permanentAddress strip_tags($permanentAddress);
  254.         return $this;
  255.     }
  256.     public function getDob(): ?\DateTimeInterface
  257.     {
  258.         return $this->dob;
  259.     }
  260.     public function setDob(\DateTimeInterface $dob): self
  261.     {
  262.         $this->dob $dob;
  263.         return $this;
  264.     }
  265.     public function getDor(): ?\DateTimeInterface
  266.     {
  267.         return $this->dor;
  268.     }
  269.     public function setDor(?\DateTimeInterface $dor): self
  270.     {
  271.         $this->dor $dor;
  272.         return $this;
  273.     }
  274.     public function getAdharNum(): ?string
  275.     {
  276.         return $this->adharNum;
  277.     }
  278.     public function setAdharNum(string $adharNum): self
  279.     {
  280.         $this->adharNum $adharNum;
  281.         return $this;
  282.     }
  283.     public function getPanNum(): ?string
  284.     {
  285.         return $this->panNum;
  286.     }
  287.     public function setPanNum(string $panNum): self
  288.     {
  289.         $this->panNum $panNum;
  290.         return $this;
  291.     }
  292.     public function getEmail(): ?string
  293.     {
  294.         return $this->email;
  295.     }
  296.     public function getTempEmail(): ?string
  297.     {
  298.         return $this->temp_email;
  299.     }
  300.     public function getEmailOTP(): ?int
  301.     {
  302.         return $this->email_otp;
  303.     }
  304.     public function getEmailOTPVerify(): ?int
  305.     {
  306.         return $this->email_otp_verify;
  307.     }
  308.     public function setEmail(string $email): self
  309.     {
  310.         $this->email $email;
  311.         return $this;
  312.     }
  313.     public function setEmailOTP(int $email_otp): self
  314.     {
  315.         $this->email_otp $email_otp;
  316.         return $this;
  317.     }
  318.     public function setEmailOTPVerify(int $email_otp_verify): self
  319.     {
  320.         $this->email_otp_verify $email_otp_verify;
  321.         return $this;
  322.     }
  323.     public function getMobile(): ?string
  324.     {
  325.         return $this->mobile;
  326.     }
  327.     public function getTempMobile(): ?string
  328.     {
  329.         return $this->temp_mobile_no;
  330.     }
  331.     public function setMobile(string $mobile): self
  332.     {
  333.         $this->mobile $mobile;
  334.         return $this;
  335.     }
  336.     public function setMobileOTP(int $mobile_otp): self
  337.     {
  338.         $this->mobile_otp $mobile_otp;
  339.         return $this;
  340.     }
  341.     public function setTempMobile(int $temp_mobile_no): self
  342.     {
  343.         $this->temp_mobile_no $temp_mobile_no;
  344.         return $this;
  345.     }
  346.     public function getMobileOTPVerify(): ?int
  347.     {
  348.         return $this->mobile_otp_verify;
  349.     }
  350.     public function getMobileOTP(): ?int
  351.     {
  352.         return $this->mobile_otp;
  353.     }
  354.     public function setMobileOTPVerify(): ?int
  355.     {
  356.         return $this->mobile_otp_verify;
  357.     }
  358.     public function getEmpSenNum(): ?string
  359.     {
  360.         return $this->empSenNum;
  361.     }
  362.     public function setEmpSenNum(string $empSenNum): self
  363.     {
  364.         $this->empSenNum $empSenNum;
  365.         return $this;
  366.     }
  367.     public function getGpfCpfNum(): ?string
  368.     {
  369.         return $this->gpfCpfNum;
  370.     }
  371.     public function setGpfCpfNum(string $gpfCpfNum): self
  372.     {
  373.         $this->gpfCpfNum $gpfCpfNum;
  374.         return $this;
  375.     }
  376.     public function getContractNum(): ?string
  377.     {
  378.         return $this->contractNum;
  379.     }
  380.     public function setContractNum(string $contractNum): self
  381.     {
  382.         $this->contractNum $contractNum;
  383.         return $this;
  384.     }
  385.     public function getIsUpdate(): ?string
  386.     {
  387.         return $this->is_update;
  388.     }
  389.     public function setIsUpdate(string $is_update): self
  390.     {
  391.         $this->is_update $is_update;
  392.         return $this;
  393.     }
  394.     /* public function getCastCategory(): ?string
  395.     {
  396.         return $this->castCategory;
  397.     }
  398.     public function setCastCategory(string $castCategory): self
  399.     {
  400.         $this->castCategory = $castCategory;
  401.         return $this;
  402.     } */
  403.     public function getQuotaType(): ?string
  404.     {
  405.         return $this->quotaType;
  406.     }
  407.     public function setQuotaType(string $quotaType): self
  408.     {
  409.         $this->quotaType $quotaType;
  410.         return $this;
  411.     }
  412.     public function getJobType(): ?string
  413.     {
  414.         return $this->jobType;
  415.     }
  416.     public function setJobType(string $jobType): self
  417.     {
  418.         $this->jobType $jobType;
  419.         return $this;
  420.     }
  421.     public function getBankName(): ?string
  422.     {
  423.         return $this->bankName;
  424.     }
  425.     public function setBankName(string $bankName): self
  426.     {
  427.         $this->bankName strip_tags($bankName);
  428.         return $this;
  429.     }
  430.     public function getBankBranch(): ?string
  431.     {
  432.         return $this->bankBranch;
  433.     }
  434.     public function setBankBranch(string $bankBranch): self
  435.     {
  436.         $this->bankBranch strip_tags($bankBranch);
  437.         return $this;
  438.     }
  439.     public function getBankBranchAddress(): ?string
  440.     {
  441.         return $this->bankBranchAddress;
  442.     }
  443.     public function setBankBranchAddress(string $bankBranchAddress): self
  444.     {
  445.         $this->bankBranchAddress strip_tags($bankBranchAddress);
  446.         return $this;
  447.     }
  448.     public function getBankAccount(): ?string
  449.     {
  450.         return $this->bankAccount;
  451.     }
  452.     public function setBankAccount(string $bankAccount): self
  453.     {
  454.         $this->bankAccount $bankAccount;
  455.         return $this;
  456.     }
  457.     public function getBankIfsCode(): ?string
  458.     {
  459.         return $this->bankIfsCode;
  460.     }
  461.     public function setBankIfsCode(string $bankIfsCode): self
  462.     {
  463.         $this->bankIfsCode strip_tags($bankIfsCode);
  464.         return $this;
  465.     }
  466.     public function getUser(): ?User
  467.     {
  468.         return $this->user;
  469.     }
  470.     public function setUser(User $user): self
  471.     {
  472.         $this->user $user;
  473.         if ($user->getProfile() !== $this) {
  474.             $user->setProfile($this);
  475.         }
  476.         return $this;
  477.     }
  478.     public function getHospital(): ?Hospital
  479.     {
  480.         return $this->hospital;
  481.     }
  482.     public function setHospital(Hospital $hospital): self
  483.     {
  484.         $this->hospital $hospital;
  485.         return $this;
  486.     }
  487.     public function getDoctorCategory(): ?DoctorCategory
  488.     {
  489.         return $this->doctorCategory;
  490.     }
  491.     public function setDoctorCategory(?DoctorCategory $doctorCategory): self
  492.     {
  493.         $this->doctorCategory $doctorCategory;
  494.         return $this;
  495.     }
  496.     public function getWard(): ?Ward
  497.     {
  498.         return $this->ward;
  499.     }
  500.     public function setWard(?Ward $ward): self
  501.     {
  502.         $this->ward $ward;
  503.         return $this;
  504.     }
  505.     public function getDesignation(): ?DesignationSetting
  506.     {
  507.         return $this->designation;
  508.     }
  509.     public function setDesignation(DesignationSetting $designation): self
  510.     {
  511.         $this->designation $designation;
  512.         return $this;
  513.     }
  514.     public function getRegNum(): ?string
  515.     {
  516.         return $this->regNum;
  517.     }
  518.     public function setRegNum(string $regNum): self
  519.     {
  520.         $this->regNum $regNum;
  521.         return $this;
  522.     }
  523.     public function getCreatedAt(): ?\DateTimeInterface
  524.     {
  525.         return $this->createdAt;
  526.     }
  527.     public function getUpdatedAt(): ?\DateTimeInterface
  528.     {
  529.         return $this->updatedAt;
  530.     }
  531.     public function getFullName()
  532.     {
  533.         return $this->getFirstName() . ' ' $this->getLastName();
  534.     }
  535.     /**
  536.      * @return Collection|StaffServiceOrder[]
  537.      */
  538.     public function getServiceOrders(): Collection
  539.     {
  540.         return $this->serviceOrders;
  541.     }
  542.     public function addServiceOrder(StaffServiceOrder $serviceOrder): self
  543.     {
  544.         if (!$this->serviceOrders->contains($serviceOrder)) {
  545.             $this->serviceOrders[] = $serviceOrder;
  546.             $serviceOrder->setProfile($this);
  547.         }
  548.         return $this;
  549.     }
  550.     public function removeServiceOrder(StaffServiceOrder $serviceOrder): self
  551.     {
  552.         if ($this->serviceOrders->contains($serviceOrder)) {
  553.             $this->serviceOrders->removeElement($serviceOrder);
  554.             if ($serviceOrder->getProfile() === $this) {
  555.                 $serviceOrder->setProfile(null);
  556.             }
  557.         }
  558.         return $this;
  559.     }
  560.     /**
  561.      * @return Collection|StaffEducation[]
  562.      */
  563.     public function getEducation(): Collection
  564.     {
  565.         return $this->education;
  566.     }
  567.     public function addEducation(StaffEducation $education): self
  568.     {
  569.         if (!$this->education->contains($education)) {
  570.             $this->education[] = $education;
  571.             $education->setProfile($this);
  572.         }
  573.         return $this;
  574.     }
  575.     public function removeEducation(StaffEducation $education): self
  576.     {
  577.         if ($this->education->contains($education)) {
  578.             $this->education->removeElement($education);
  579.             if ($education->getProfile() === $this) {
  580.                 $education->setProfile(null);
  581.             }
  582.         }
  583.         return $this;
  584.     }
  585.     /**
  586.      * @return Collection|StaffFamilyMember[]
  587.      */
  588.     public function getFamilyMembers(): Collection
  589.     {
  590.         return $this->familyMembers;
  591.     }
  592.     public function addFamilyMember(StaffFamilyMember $familyMember): self
  593.     {
  594.         if (!$this->familyMembers->contains($familyMember)) {
  595.             $this->familyMembers[] = $familyMember;
  596.             $familyMember->setProfile($this);
  597.         }
  598.         return $this;
  599.     }
  600.     public function removeFamilyMember(StaffFamilyMember $familyMember): self
  601.     {
  602.         if ($this->familyMembers->contains($familyMember)) {
  603.             $this->familyMembers->removeElement($familyMember);
  604.             if ($familyMember->getProfile() === $this) {
  605.                 $familyMember->setProfile(null);
  606.             }
  607.         }
  608.         return $this;
  609.     }
  610.     /**
  611.      * @return Collection|StaffWorkExperience[]
  612.      */
  613.     public function getWorkExperiences(): Collection
  614.     {
  615.         return $this->workExperiences;
  616.     }
  617.     public function addWorkExperience(StaffWorkExperience $workExperience): self
  618.     {
  619.         if (!$this->workExperiences->contains($workExperience)) {
  620.             $this->workExperiences[] = $workExperience;
  621.             $workExperience->setProfile($this);
  622.         }
  623.         return $this;
  624.     }
  625.     public function removeWorkExperience(StaffWorkExperience $workExperience): self
  626.     {
  627.         if ($this->workExperiences->contains($workExperience)) {
  628.             $this->workExperiences->removeElement($workExperience);
  629.             if ($workExperience->getProfile() === $this) {
  630.                 $workExperience->setProfile(null);
  631.             }
  632.         }
  633.         return $this;
  634.     }
  635.     /**
  636.      * @return Collection|StaffTraining[]
  637.      */
  638.     public function getTrainings(): Collection
  639.     {
  640.         return $this->trainings;
  641.     }
  642.     public function addTraining(StaffTraining $training): self
  643.     {
  644.         if (!$this->trainings->contains($training)) {
  645.             $this->trainings[] = $training;
  646.             $training->setProfile($this);
  647.         }
  648.         return $this;
  649.     }
  650.     public function removeTraining(StaffTraining $training): self
  651.     {
  652.         if ($this->trainings->contains($training)) {
  653.             $this->trainings->removeElement($training);
  654.             if ($training->getProfile() === $this) {
  655.                 $training->setProfile(null);
  656.             }
  657.         }
  658.         return $this;
  659.     }
  660.     /**
  661.      * @return Collection|StaffSalaryHistory[]
  662.      */
  663.     public function getSalaryHistories(): Collection
  664.     {
  665.         return $this->salaryHistories;
  666.     }
  667.     public function addSalaryHistory(StaffSalaryHistory $salaryHistory): self
  668.     {
  669.         if (!$this->salaryHistories->contains($salaryHistory)) {
  670.             $this->salaryHistories[] = $salaryHistory;
  671.             $salaryHistory->setProfile($this);
  672.         }
  673.         return $this;
  674.     }
  675.     public function removeSalaryHistory(StaffSalaryHistory $salaryHistory): self
  676.     {
  677.         if ($this->salaryHistories->contains($salaryHistory)) {
  678.             $this->salaryHistories->removeElement($salaryHistory);
  679.             if ($salaryHistory->getProfile() === $this) {
  680.                 $salaryHistory->setProfile(null);
  681.             }
  682.         }
  683.         return $this;
  684.     }
  685.     /**
  686.      * @return Collection|StaffDeputation[]
  687.      */
  688.     public function getDeputations(): Collection
  689.     {
  690.         return $this->deputations;
  691.     }
  692.     public function addDeputation(StaffDeputation $deputation): self
  693.     {
  694.         if (!$this->deputations->contains($deputation)) {
  695.             $this->deputations[] = $deputation;
  696.             $deputation->setProfile($this);
  697.         }
  698.         return $this;
  699.     }
  700.     public function removeDeputation(StaffDeputation $deputation): self
  701.     {
  702.         if ($this->deputations->contains($deputation)) {
  703.             $this->deputations->removeElement($deputation);
  704.             if ($deputation->getProfile() === $this) {
  705.                 $deputation->setProfile(null);
  706.             }
  707.         }
  708.         return $this;
  709.     }
  710.     /**
  711.      * @return Collection|StaffComplaint[]
  712.      */
  713.     public function getComplaints(): Collection
  714.     {
  715.         return $this->complaints;
  716.     }
  717.     public function addComplaint(StaffComplaint $complaint): self
  718.     {
  719.         if (!$this->complaints->contains($complaint)) {
  720.             $this->complaints[] = $complaint;
  721.             $complaint->setProfile($this);
  722.         }
  723.         return $this;
  724.     }
  725.     public function removeComplaint(StaffComplaint $complaint): self
  726.     {
  727.         if ($this->complaints->contains($complaint)) {
  728.             $this->complaints->removeElement($complaint);
  729.             if ($complaint->getProfile() === $this) {
  730.                 $complaint->setProfile(null);
  731.             }
  732.         }
  733.         return $this;
  734.     }
  735.     /**
  736.      * @return Collection|StaffLeaveAllotment[]
  737.      */
  738.     public function getLeaveAllotments(): Collection
  739.     {
  740.         return $this->leaveAllotments;
  741.     }
  742.     public function addLeaveAllotment(StaffLeaveAllotment $leaveAllotment): self
  743.     {
  744.         if (!$this->leaveAllotments->contains($leaveAllotment)) {
  745.             $this->leaveAllotments[] = $leaveAllotment;
  746.             $leaveAllotment->setProfile($this);
  747.         }
  748.         return $this;
  749.     }
  750.     public function removeLeaveAllotment(StaffLeaveAllotment $leaveAllotment): self
  751.     {
  752.         if ($this->leaveAllotments->contains($leaveAllotment)) {
  753.             $this->leaveAllotments->removeElement($leaveAllotment);
  754.             if ($leaveAllotment->getProfile() === $this) {
  755.                 $leaveAllotment->setProfile(null);
  756.             }
  757.         }
  758.         return $this;
  759.     }
  760.     public function __toString(): string
  761.     {
  762.         return $this->getFullName();
  763.     }
  764. }