src/Entity/PersonalInfo.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. use Symfony\Component\Serializer\Annotation\MaxDepth;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Entity(repositoryClass'App\Repository\PersonalInfoRepository')]
  10. class PersonalInfo
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column(type'integer')]
  15.     private $id;
  16.     #[MaxDepth(1)]
  17.     #[ORM\OneToOne(targetEntity'App\Entity\User'inversedBy'personalInfo'cascade: ['persist''remove'])]
  18.     #[ORM\JoinColumn(name'user_id'referencedColumnName'id'onDelete'CASCADE'nullablefalse)]
  19.     private $user;
  20.     #[Groups(['LogService''EmailSchedule'])]
  21.     #[ORM\Column(type'string'length64nullabletrue)]
  22.     private $firstName;
  23.     #[Groups(['LogService''EmailSchedule'])]
  24.     #[ORM\Column(type'string'length128nullabletrue)]
  25.     private $middleName;
  26.     #[Groups(['LogService''EmailSchedule'])]
  27.     #[ORM\Column(type'string'length128nullabletrue)]
  28.     private $lastName;
  29.     #[ORM\Column(type'string'length255nullabletrue)]
  30.     private $chineseName;
  31.     #[ORM\Column(type'string'length255nullabletrue)]
  32.     private $addressStreet;
  33.     #[ORM\Column(type'string'length255nullabletrue)]
  34.     private $addressCity;
  35.     #[ORM\Column(type'string'length64nullabletrue)]
  36.     private $jobTitle;
  37.     #[ORM\Column(type'date'nullabletrue)]
  38.     private $jobJoinDate;
  39.     #[ORM\Column(type'text'nullabletrue)]
  40.     private $jobDescription;
  41.     #[ORM\Column(type'text'nullabletrue)]
  42.     private $jobResponsibility;
  43.     #[ORM\Column(type'string'length64nullabletrue)]
  44.     private $taxNumber;
  45.     #[ORM\Column(type'string'length32nullabletrue)]
  46.     private $taxStatus;
  47.     #[ORM\Column(type'string'length64nullabletrue)]
  48.     private $socialSecurityNumber;
  49.     #[ORM\Column(type'string'length32nullabletrue)]
  50.     private $gender;
  51.     #[ORM\Column(type'string'length32nullabletrue)]
  52.     private $religion;
  53.     #[ORM\Column(type'string'length3nullabletrue)]
  54.     private $bloodType;
  55.     #[ORM\Column(type'string'length32nullabletrue)]
  56.     private $birthPlace;
  57.     #[ORM\Column(type'date'nullabletrue)]
  58.     private $birthDate;
  59.     #[ORM\Column(type'string'length8nullabletrue)]
  60.     private $nationality;
  61.     #[ORM\Column(type'string'length32nullabletrue)]
  62.     private $idNumber;
  63.     #[ORM\Column(type'string'length32nullabletrue)]
  64.     private $passportNumber;
  65.     #[ORM\Column(type'date'nullabletrue)]
  66.     private $passportIssueDate;
  67.     #[ORM\Column(type'date'nullabletrue)]
  68.     private $passportExpiryDate;
  69.     #[ORM\Column(type'string'length32nullabletrue)]
  70.     private $employmentPassNumber;
  71.     #[ORM\Column(type'date'nullabletrue)]
  72.     private $workPermitIssueDate;
  73.     #[ORM\Column(type'date'nullabletrue)]
  74.     private $workPermitExpiryDate;
  75.     #[ORM\Column(type'string'length32nullabletrue)]
  76.     private $contactPhone;
  77.     #[ORM\Column(type'string'length32nullabletrue)]
  78.     private $contactMobile;
  79.     #[ORM\Column(type'string'length128nullabletrue)]
  80.     private $contactEmail;
  81.     #[ORM\Column(type'string'length128nullabletrue)]
  82.     private $contactSkype;
  83.     #[ORM\Column(type'string'length64nullabletrue)]
  84.     private $emergencyContactName;
  85.     #[ORM\Column(type'string'length32nullabletrue)]
  86.     private $emergencyContactPhone;
  87.     #[ORM\Column(type'string'length32nullabletrue)]
  88.     private $maritalStatus;
  89.     #[ORM\Column(type'string'length128nullabletrue)]
  90.     private $spouseName;
  91.     #[ORM\Column(type'string'length32nullabletrue)]
  92.     private $spousePassportNumber;
  93.     #[ORM\Column(type'string'length8nullabletrue)]
  94.     private $spouseNationality;
  95.     #[ORM\Column(type'string'length32nullabletrue)]
  96.     private $spouseOccupation;
  97.     #[ORM\Column(type'string'length32nullabletrue)]
  98.     private $spouseEmployer;
  99.     #[ORM\Column(type'text'nullabletrue)]
  100.     private $profilePicture;
  101.     #[Groups(['UserInfo'])]
  102.     #[ORM\Column(type'string'length32nullabletrue)]
  103.     private $jobStatus;
  104.     #[ORM\OneToMany(targetEntity'App\Entity\Children'mappedBy'personalInfo'orphanRemovaltruefetch'EXTRA_LAZY')]
  105.     private $childrens;
  106.     #[ORM\OneToMany(targetEntity'App\Entity\Bank'mappedBy'personalInfo'fetch'EXTRA_LAZY')]
  107.     private $banks;
  108.     #[ORM\OneToOne(targetEntity'App\Entity\Bank'cascade: ['persist''remove'], fetch'EXTRA_LAZY')]
  109.     private $preferredBank;
  110.     #[ORM\Column(type'datetime'nullabletrue)]
  111.     private $modifiedAt;
  112.     #[Groups(['UserInfo'])]
  113.     #[ORM\Column(type'date'nullabletrue)]
  114.     private $jobExpiryDate;
  115.     #[ORM\Column(type'string'length128nullabletrue)]
  116.     private $workPermitType;
  117.     #[ORM\Column(type'text'nullabletrue)]
  118.     private $curriculumVitae;
  119.     #[ORM\Column(type'text'nullabletrue)]
  120.     private $aboutMe;
  121.     #[ORM\OneToOne(targetEntitySocialMedia::class, mappedBy'personalInfo'fetch'EXTRA_LAZY'cascade: ['persist''remove'])]
  122.     private $socialMedia;
  123.     #[ORM\Column(type'string'length10nullabletrue)]
  124.     private $addressPostcode;
  125.     #[ORM\Column(type'string'length8nullabletrue)]
  126.     private $addressCountry;
  127.     #[ORM\Column(type'string'length255nullabletrue)]
  128.     private $Language;
  129.     #[Groups(['UserInfo'])]
  130.     #[ORM\Column(type'date'nullabletrue)]
  131.     private $jobTerminateDate;
  132.     #[Groups(['UserInfo'])]
  133.     #[ORM\Column(type'string'length255nullabletrue)]
  134.     private $jobTerminateReason;
  135.     #[ORM\OneToOne(targetEntityVaccination::class, mappedBy'personalInfo'fetch'EXTRA_LAZY'cascade: ['persist''remove'])]
  136.     private $vaccination;
  137.     #[ORM\Column(type'date'nullabletrue)]
  138.     private $jobPermanentDate;
  139.     #[ORM\Column(type'json'nullabletrue)]
  140.     private $attributes;
  141.     #[ORM\ManyToOne(targetEntityUserRole::class, inversedBy'personalInfo')]
  142.     private $userRole;
  143.     #[ORM\Column(type'string'length128nullabletrue)]
  144.     private $contactWechat;
  145.     #[ORM\Column(type'string'length128nullabletrue)]
  146.     private $contactWhatsapp;
  147.     #[ORM\Column(type'text'length255nullabletrue)]
  148.     private $appointmentScheduling null;
  149.     #[ORM\Column(type'date'nullabletrue)]
  150.     private $idIssueDate;
  151.     #[ORM\Column(type'date'nullabletrue)]
  152.     private $idExpiryDate;
  153.     #[ORM\Column(type'text'nullabletrue)]
  154.     private $idFile;
  155.     #[ORM\Column(type'text'nullabletrue)]
  156.     private $passportFile;
  157.     #[ORM\Column(type'text'nullabletrue)]
  158.     private $employmentPassFile;
  159.     #[ORM\Column(type'date'nullabletrue)]
  160.     private $pipDate;
  161.     #[ORM\Column(type'date'nullabletrue)]
  162.     private $pipExtensionDate;
  163.     #[ORM\Column(length255nullabletrue)]
  164.     private ?string $pipFile null;
  165.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  166.     private ?\DateTimeInterface $pipEndDate null;
  167.     #[ORM\OneToOne(inversedBy'personalInfo'cascade: ['persist''remove'])]
  168.     private ?RecruitApplication $recruitApplicant null;
  169.     #[ORM\Column(length255nullabletrue)]
  170.     private ?string $taxFile null;
  171.     public function __construct()
  172.     {
  173.         $this->childrens = new ArrayCollection();
  174.         $this->banks = new ArrayCollection();
  175.     }
  176.     public function getId(): ?int
  177.     {
  178.         return $this->id;
  179.     }
  180.     public function getUser(): ?User
  181.     {
  182.         return $this->user;
  183.     }
  184.     public function setUser(User $user): self
  185.     {
  186.         $this->user $user;
  187.         return $this;
  188.     }
  189.     public function getFirstName($urlSafe false): ?string
  190.     {
  191.         if ($urlSafe) {
  192.             return preg_replace(array('/[^a-z0-9-]/i''/[ ]{2,}/''/[ ]/'), array(' '' ''-'), strtolower($this->firstName));
  193.         } else {
  194.             return $this->firstName;
  195.         }
  196.     }
  197.     public function setFirstName(?string $firstName): self
  198.     {
  199.         $this->firstName $firstName;
  200.         return $this;
  201.     }
  202.     public function getMiddleName(): ?string
  203.     {
  204.         return $this->middleName;
  205.     }
  206.     public function setMiddleName(?string $middleName): self
  207.     {
  208.         $this->middleName $middleName;
  209.         return $this;
  210.     }
  211.     public function getLastName(): ?string
  212.     {
  213.         return $this->lastName;
  214.     }
  215.     public function setLastName(?string $lastName): self
  216.     {
  217.         $this->lastName $lastName;
  218.         return $this;
  219.     }
  220.     public function getAddressStreet(): ?string
  221.     {
  222.         return $this->addressStreet;
  223.     }
  224.     public function setAddressStreet(?string $addressStreet): self
  225.     {
  226.         $this->addressStreet $addressStreet;
  227.         return $this;
  228.     }
  229.     public function getAddressCity(): ?string
  230.     {
  231.         return $this->addressCity;
  232.     }
  233.     public function setAddressCity(?string $addressCity): self
  234.     {
  235.         $this->addressCity $addressCity;
  236.         return $this;
  237.     }
  238.     public function getJobTitle(): ?string
  239.     {
  240.         // return $this->jobTitle; not used anymore, but keep it for backward compatibility
  241.         return $this->user->getUserTitle() ?? $this->jobTitle;
  242.     }
  243.     public function setJobTitle(?string $jobTitle): self
  244.     {
  245.         $this->jobTitle $jobTitle;
  246.         return $this;
  247.     }
  248.     public function getJobJoinDate(): ?\DateTimeInterface
  249.     {
  250.         return $this->jobJoinDate;
  251.     }
  252.     public function setJobJoinDate(?\DateTimeInterface $jobJoinDate): self
  253.     {
  254.         $this->jobJoinDate $jobJoinDate;
  255.         return $this;
  256.     }
  257.     public function getJobDescription(): ?string
  258.     {
  259.         return $this->jobDescription;
  260.     }
  261.     public function setJobDescription(?string $jobDescription): self
  262.     {
  263.         $this->jobDescription $jobDescription;
  264.         return $this;
  265.     }
  266.     public function getJobResponsibility(): ?string
  267.     {
  268.         return $this->jobResponsibility;
  269.     }
  270.     public function setJobResponsibility(?string $jobResponsibility): self
  271.     {
  272.         $this->jobResponsibility $jobResponsibility;
  273.         return $this;
  274.     }
  275.     public function getTaxNumber(): ?string
  276.     {
  277.         return $this->taxNumber;
  278.     }
  279.     public function setTaxNumber(?string $taxNumber): self
  280.     {
  281.         $this->taxNumber $taxNumber;
  282.         return $this;
  283.     }
  284.     public function getTaxStatus(): ?string
  285.     {
  286.         return $this->taxStatus;
  287.     }
  288.     public function setTaxStatus(?string $taxStatus): self
  289.     {
  290.         $this->taxStatus $taxStatus;
  291.         return $this;
  292.     }
  293.     public function getSocialSecurityNumber(): ?string
  294.     {
  295.         return $this->socialSecurityNumber;
  296.     }
  297.     public function setSocialSecurityNumber(?string $socialSecurityNumber): self
  298.     {
  299.         $this->socialSecurityNumber $socialSecurityNumber;
  300.         return $this;
  301.     }
  302.     public function getChineseName(): ?string
  303.     {
  304.         return $this->chineseName;
  305.     }
  306.     public function setChineseName(?string $chineseName): self
  307.     {
  308.         $this->chineseName $chineseName;
  309.         return $this;
  310.     }
  311.     public function getGender(): ?string
  312.     {
  313.         return $this->gender;
  314.     }
  315.     public function setGender(?string $gender): self
  316.     {
  317.         $this->gender $gender;
  318.         return $this;
  319.     }
  320.     public function getReligion(): ?string
  321.     {
  322.         return $this->religion;
  323.     }
  324.     public function setReligion(?string $religion): self
  325.     {
  326.         $this->religion $religion;
  327.         return $this;
  328.     }
  329.     public function getBloodType(): ?string
  330.     {
  331.         return $this->bloodType;
  332.     }
  333.     public function setBloodType(?string $bloodType): self
  334.     {
  335.         $this->bloodType $bloodType;
  336.         return $this;
  337.     }
  338.     public function getBirthPlace(): ?string
  339.     {
  340.         return $this->birthPlace;
  341.     }
  342.     public function setBirthPlace(?string $birthPlace): self
  343.     {
  344.         $this->birthPlace $birthPlace;
  345.         return $this;
  346.     }
  347.     public function getBirthDate(): ?\DateTimeInterface
  348.     {
  349.         return $this->birthDate;
  350.     }
  351.     public function setBirthDate(?\DateTimeInterface $birthDate): self
  352.     {
  353.         $this->birthDate $birthDate;
  354.         return $this;
  355.     }
  356.     public function getNationality(): ?string
  357.     {
  358.         return $this->nationality;
  359.     }
  360.     public function setNationality(?string $nationality): self
  361.     {
  362.         $this->nationality $nationality;
  363.         return $this;
  364.     }
  365.     public function getIdNumber(): ?string
  366.     {
  367.         return $this->idNumber;
  368.     }
  369.     public function setIdNumber(?string $idNumber): self
  370.     {
  371.         $this->idNumber $idNumber;
  372.         return $this;
  373.     }
  374.     public function getPassportNumber(): ?string
  375.     {
  376.         return $this->passportNumber;
  377.     }
  378.     public function setPassportNumber(?string $passportNumber): self
  379.     {
  380.         $this->passportNumber $passportNumber;
  381.         return $this;
  382.     }
  383.     public function getPassportIssueDate(): ?\DateTimeInterface
  384.     {
  385.         return $this->passportIssueDate;
  386.     }
  387.     public function setPassportIssueDate(?\DateTimeInterface $passportIssueDate): self
  388.     {
  389.         $this->passportIssueDate $passportIssueDate;
  390.         return $this;
  391.     }
  392.     public function getPassportExpiryDate(): ?\DateTimeInterface
  393.     {
  394.         return $this->passportExpiryDate;
  395.     }
  396.     public function setPassportExpiryDate(?\DateTimeInterface $passportExpiryDate): self
  397.     {
  398.         $this->passportExpiryDate $passportExpiryDate;
  399.         return $this;
  400.     }
  401.     public function getEmploymentPassNumber(): ?string
  402.     {
  403.         return $this->employmentPassNumber;
  404.     }
  405.     public function setEmploymentPassNumber(?string $employmentPassNumber): self
  406.     {
  407.         $this->employmentPassNumber $employmentPassNumber;
  408.         return $this;
  409.     }
  410.     public function getWorkPermitIssueDate(): ?\DateTimeInterface
  411.     {
  412.         return $this->workPermitIssueDate;
  413.     }
  414.     public function setWorkPermitIssueDate(?\DateTimeInterface $workPermitIssueDate): self
  415.     {
  416.         $this->workPermitIssueDate $workPermitIssueDate;
  417.         return $this;
  418.     }
  419.     public function getWorkPermitExpiryDate(): ?\DateTimeInterface
  420.     {
  421.         return $this->workPermitExpiryDate;
  422.     }
  423.     public function setWorkPermitExpiryDate(?\DateTimeInterface $workPermitExpiryDate): self
  424.     {
  425.         $this->workPermitExpiryDate $workPermitExpiryDate;
  426.         return $this;
  427.     }
  428.     public function getContactPhone(): ?string
  429.     {
  430.         return $this->contactPhone;
  431.     }
  432.     public function setContactPhone(?string $contactPhone): self
  433.     {
  434.         $this->contactPhone $contactPhone;
  435.         return $this;
  436.     }
  437.     public function getContactMobile(): ?string
  438.     {
  439.         return $this->contactMobile;
  440.     }
  441.     public function setContactMobile(?string $contactMobile): self
  442.     {
  443.         $this->contactMobile $contactMobile;
  444.         return $this;
  445.     }
  446.     public function getContactEmail(): ?string
  447.     {
  448.         return $this->contactEmail;
  449.     }
  450.     public function setContactEmail(?string $contactEmail): self
  451.     {
  452.         $this->contactEmail $contactEmail;
  453.         return $this;
  454.     }
  455.     public function getContactSkype(): ?string
  456.     {
  457.         return $this->contactSkype;
  458.     }
  459.     public function setContactSkype(?string $contactSkype): self
  460.     {
  461.         $this->contactSkype $contactSkype;
  462.         return $this;
  463.     }
  464.     public function getEmergencyContactName(): ?string
  465.     {
  466.         return $this->emergencyContactName;
  467.     }
  468.     public function setEmergencyContactName(?string $emergencyContactName): self
  469.     {
  470.         $this->emergencyContactName $emergencyContactName;
  471.         return $this;
  472.     }
  473.     public function getEmergencyContactPhone(): ?string
  474.     {
  475.         return $this->emergencyContactPhone;
  476.     }
  477.     public function setEmergencyContactPhone(?string $emergencyContactPhone): self
  478.     {
  479.         $this->emergencyContactPhone $emergencyContactPhone;
  480.         return $this;
  481.     }
  482.     public function getMaritalStatus(): ?string
  483.     {
  484.         return $this->maritalStatus;
  485.     }
  486.     public function setMaritalStatus(?string $maritalStatus): self
  487.     {
  488.         $this->maritalStatus $maritalStatus;
  489.         return $this;
  490.     }
  491.     public function getSpouseName(): ?string
  492.     {
  493.         return $this->spouseName;
  494.     }
  495.     public function setSpouseName(?string $spouseName): self
  496.     {
  497.         $this->spouseName $spouseName;
  498.         return $this;
  499.     }
  500.     public function getSpousePassportNumber(): ?string
  501.     {
  502.         return $this->spousePassportNumber;
  503.     }
  504.     public function setSpousePassportNumber(?string $spousePassportNumber): self
  505.     {
  506.         $this->spousePassportNumber $spousePassportNumber;
  507.         return $this;
  508.     }
  509.     public function getSpouseNationality(): ?string
  510.     {
  511.         return $this->spouseNationality;
  512.     }
  513.     public function setSpouseNationality(?string $spouseNationality): self
  514.     {
  515.         $this->spouseNationality $spouseNationality;
  516.         return $this;
  517.     }
  518.     public function getSpouseOccupation(): ?string
  519.     {
  520.         return $this->spouseOccupation;
  521.     }
  522.     public function setSpouseOccupation(?string $spouseOccupation): self
  523.     {
  524.         $this->spouseOccupation $spouseOccupation;
  525.         return $this;
  526.     }
  527.     public function getSpouseEmployer(): ?string
  528.     {
  529.         return $this->spouseEmployer;
  530.     }
  531.     public function setSpouseEmployer(?string $spouseEmployer): self
  532.     {
  533.         $this->spouseEmployer $spouseEmployer;
  534.         return $this;
  535.     }
  536.     public function getProfilePicture(): ?string
  537.     {
  538.         return $this->profilePicture;
  539.     }
  540.     public function setProfilePicture(?string $profilePicture): self
  541.     {
  542.         $this->profilePicture $profilePicture;
  543.         return $this;
  544.     }
  545.     public function getJobStatus(): ?string
  546.     {
  547.         return $this->jobStatus;
  548.     }
  549.     public function setJobStatus(?string $jobStatus): self
  550.     {
  551.         $this->jobStatus $jobStatus;
  552.         return $this;
  553.     }
  554.     public function getAttributes(): ?array
  555.     {
  556.         return $this->attributes;
  557.     }
  558.     public function setAttributes(?array $attributes): self
  559.     {
  560.         $this->attributes $attributes;
  561.         return $this;
  562.     }
  563.     /**
  564.      * @return Collection|Children[]
  565.      */
  566.     public function getChildrens(): Collection
  567.     {
  568.         return $this->childrens;
  569.     }
  570.     public function addChildren(Children $children): self
  571.     {
  572.         if (!$this->childrens->contains($children)) {
  573.             $this->childrens[] = $children;
  574.             $children->setPersonalInfo($this);
  575.         }
  576.         return $this;
  577.     }
  578.     public function removeChildren(Children $children): self
  579.     {
  580.         if ($this->childrens->contains($children)) {
  581.             $this->childrens->removeElement($children);
  582.             // set the owning side to null (unless already changed)
  583.             if ($children->getPersonalInfo() === $this) {
  584.                 $children->setPersonalInfo(null);
  585.             }
  586.         }
  587.         return $this;
  588.     }
  589.     /**
  590.      * @return Collection|Bank[]
  591.      */
  592.     public function getBanks(): Collection
  593.     {
  594.         return $this->banks;
  595.     }
  596.     public function addBank(Bank $bank): self
  597.     {
  598.         if (!$this->banks->contains($bank)) {
  599.             $this->banks[] = $bank;
  600.             $bank->setPersonalInfo($this);
  601.         }
  602.         return $this;
  603.     }
  604.     public function removeBank(Bank $bank): self
  605.     {
  606.         if ($this->banks->contains($bank)) {
  607.             $this->banks->removeElement($bank);
  608.             // set the owning side to null (unless already changed)
  609.             if ($bank->getPersonalInfo() === $this) {
  610.                 $bank->setPersonalInfo(null);
  611.             }
  612.         }
  613.         return $this;
  614.     }
  615.     public function getPreferredBank(): ?Bank
  616.     {
  617.         return $this->preferredBank;
  618.     }
  619.     public function setPreferredBank(?Bank $preferredBank): self
  620.     {
  621.         $this->preferredBank $preferredBank;
  622.         return $this;
  623.     }
  624.     public function getFullName($urlSafe false)
  625.     {
  626.         $fullname $this->firstName;
  627.         if ($this->middleName$fullname .= ' ' $this->middleName;
  628.         if ($this->lastName$fullname .= ' ' $this->lastName;
  629.         if ($urlSafe) {
  630.             $fullname preg_replace(array('/[^a-z0-9-]/i''/[ ]{2,}/''/[ ]/'), array(' '' ''-'), strtolower($fullname));
  631.         };
  632.         return $fullname;
  633.     }
  634.     public function getShortFullName($urlSafe false){
  635.         $shortFullName $this->firstName;
  636.         $shortFullName .= ' ' substr($this->middleName ?? $this->lastName01) . '.'
  637.         if ($urlSafe) {
  638.             $shortFullName preg_replace(array('/[^a-z0-9-]/i''/[ ]{2,}/''/[ ]/'), array(' '' ''-'), strtolower($shortFullName));
  639.         };
  640.         return $shortFullName;
  641.     }
  642.     public function originalProfilePicture()
  643.     {
  644.         $filename explode('/'$this->profilePicture);
  645.         return $filename[0] . '/' $filename[1] . '/original-' $filename[2];
  646.     }
  647.     public function profileCompletion()
  648.     {
  649.         $pc['data'] = [];
  650.         $pc['completed'] = 0;
  651.         if ($this->getFullName() == null) {
  652.             array_push($pc['data'], ['message.profile.name' => false]);
  653.         } else {
  654.             array_push($pc['data'], ['message.profile.name' => true]);
  655.             $pc['completed']++;
  656.         }
  657.         if ($this->profilePicture == null && $this->user->getTemporaryPicture() == null) {
  658.             array_push($pc['data'], ['message.profile.picture' => false]);
  659.         } else {
  660.             array_push($pc['data'], ['message.profile.picture' => true]);
  661.             $pc['completed']++;
  662.         }
  663.         if ($this->contactMobile == null) {
  664.             array_push($pc['data'], ['message.profile.contact' => false]);
  665.         } else {
  666.             array_push($pc['data'], ['message.profile.contact' => true]);
  667.             $pc['completed']++;
  668.         }
  669.         if ($this->addressStreet == null) {
  670.             array_push($pc['data'], ['message.profile.address' => false]);
  671.         } else {
  672.             array_push($pc['data'], ['message.profile.address' => true]);
  673.             $pc['completed']++;
  674.         }
  675.         if (count($this->banks) == 0) {
  676.             array_push($pc['data'], ['message.profile.bank' => false]);
  677.         } else {
  678.             array_push($pc['data'], ['message.profile.bank' => true]);
  679.             $pc['completed']++;
  680.         }
  681.         $pc['total'] = ($pc['completed'] / count($pc['data'])) * 100;
  682.         return $pc;
  683.     }
  684.     public function getModifiedAt(): ?\DateTimeInterface
  685.     {
  686.         return $this->modifiedAt;
  687.     }
  688.     public function setModifiedAt(?\DateTimeInterface $modifiedAt): self
  689.     {
  690.         $this->modifiedAt $modifiedAt;
  691.         return $this;
  692.     }
  693.     public function getJobExpiryDate(): ?\DateTimeInterface
  694.     {
  695.         return $this->jobExpiryDate;
  696.     }
  697.     public function setJobExpiryDate(?\DateTimeInterface $jobExpiryDate): self
  698.     {
  699.         $this->jobExpiryDate $jobExpiryDate;
  700.         return $this;
  701.     }
  702.     public function getWorkPermitType(): ?string
  703.     {
  704.         return $this->workPermitType;
  705.     }
  706.     public function setWorkPermitType(?string $workPermitType): self
  707.     {
  708.         $this->workPermitType $workPermitType;
  709.         return $this;
  710.     }
  711.     public function getCurriculumVitae(): ?string
  712.     {
  713.         return $this->curriculumVitae;
  714.     }
  715.     public function setCurriculumVitae(?string $curriculumVitae): self
  716.     {
  717.         $this->curriculumVitae $curriculumVitae;
  718.         return $this
  719.     }
  720.     public function getAboutMe(): ?string
  721.     {
  722.         return $this->aboutMe;
  723.     }
  724.     public function setAboutMe(?string $aboutMe): self
  725.     {
  726.         $this->aboutMe $aboutMe;
  727.         return $this;
  728.     }
  729.     public function getSocialMedia(): ?SocialMedia
  730.     {
  731.         return $this->socialMedia;
  732.     }
  733.     public function setSocialMedia(?SocialMedia $socialMedia): self
  734.     {
  735.         $this->socialMedia $socialMedia;
  736.         // set (or unset) the owning side of the relation if necessary
  737.         $newPersonalInfo null === $socialMedia null $this;
  738.         if ($socialMedia->getPersonalInfo() !== $newPersonalInfo) {
  739.             $socialMedia->setPersonalInfo($newPersonalInfo);
  740.         }
  741.         return $this;
  742.     }
  743.     public function getAddressPostcode(): ?string
  744.     {
  745.         return $this->addressPostcode;
  746.     }
  747.     public function setAddressPostcode(?string $addressPostcode): self
  748.     {
  749.         $this->addressPostcode $addressPostcode;
  750.         return $this;
  751.     }
  752.     public function getAddressCountry(): ?string
  753.     {
  754.         return $this->addressCountry;
  755.     }
  756.     public function setAddressCountry(?string $addressCountry): self
  757.     {
  758.         $this->addressCountry $addressCountry;
  759.         return $this;
  760.     }
  761.     public function getLanguage(): ?string
  762.     {
  763.         return $this->Language;
  764.     }
  765.     public function setLanguage(?string $Language): self
  766.     {
  767.         $this->Language $Language;
  768.         return $this;
  769.     }
  770.     public function getJobTerminateDate(): ?\DateTimeInterface
  771.     {
  772.         return $this->jobTerminateDate;
  773.     }
  774.     public function setJobTerminateDate(?\DateTimeInterface $jobTerminateDate): self
  775.     {
  776.         $this->jobTerminateDate $jobTerminateDate;
  777.         return $this;
  778.     }
  779.     public function getJobTerminateReason(): ?string
  780.     {
  781.         return $this->jobTerminateReason;
  782.     }
  783.     public function setJobTerminateReason(?string $jobTerminateReason): self
  784.     {
  785.         $this->jobTerminateReason $jobTerminateReason;
  786.         return $this;
  787.     }
  788.     public function getVaccination(): ?Vaccination
  789.     {
  790.         return $this->vaccination;
  791.     }
  792.     public function setVaccination(?Vaccination $vaccination): self
  793.     {
  794.         // unset the owning side of the relation if necessary
  795.         if ($vaccination === null && $this->vaccination !== null) {
  796.             $this->vaccination->setPersonalInfo(null);
  797.         }
  798.         // set the owning side of the relation if necessary
  799.         if ($vaccination !== null && $vaccination->getPersonalInfo() !== $this) {
  800.             $vaccination->setPersonalInfo($this);
  801.         }
  802.         $this->vaccination $vaccination;
  803.         return $this;
  804.     }
  805.     public function getJobPermanentDate(): ?\DateTimeInterface
  806.     {
  807.         return $this->jobPermanentDate;
  808.     }
  809.     public function setJobPermanentDate(?\DateTimeInterface $jobPermanentDate): self
  810.     {
  811.         $this->jobPermanentDate $jobPermanentDate;
  812.         return $this;
  813.     }
  814.     public function getUserRole(): ?UserRole
  815.     {
  816.         return $this->userRole;
  817.     }
  818.     public function setUserRole(?UserRole $userRole): self
  819.     {
  820.         $this->userRole $userRole;
  821.         return $this;
  822.     }
  823.     public function getContactWechat(): ?string
  824.     {
  825.         return $this->contactWechat;
  826.     }
  827.     public function setContactWechat(?string $contactWechat): self
  828.     {
  829.         $this->contactWechat $contactWechat;
  830.         return $this;
  831.     }  
  832.     public function getContactWhatsapp(): ?string
  833.     {
  834.         return $this->contactWhatsapp;
  835.     }
  836.     public function setContactWhatsapp(?string $contactWhatsapp): self
  837.     {
  838.         $this->contactWhatsapp $contactWhatsapp;
  839.         return $this;
  840.     }
  841.     public function getAppointmentScheduling(): ?string
  842.     {
  843.         return $this->appointmentScheduling;
  844.     }
  845.     public function setAppointmentScheduling(?string $appointmentScheduling): self
  846.     {
  847.         $this->appointmentScheduling $appointmentScheduling;
  848.         return $this;
  849.     }
  850.    
  851.     public function getIdIssueDate(): ?\DateTimeInterface
  852.     {
  853.         return $this->idIssueDate;
  854.     }
  855.     public function setIdIssueDate(?\DateTimeInterface $idIssueDate): self
  856.     {
  857.         $this->idIssueDate $idIssueDate;
  858.         return $this;
  859.     }
  860.     public function getIdExpiryDate(): ?\DateTimeInterface
  861.     {
  862.         return $this->idExpiryDate;
  863.     }
  864.     public function setIdExpiryDate(?\DateTimeInterface $idExpiryDate): self
  865.     {
  866.         $this->idExpiryDate $idExpiryDate;
  867.         return $this;
  868.     }
  869.     public function getIdFile(): ?string
  870.     {
  871.         return $this->idFile;
  872.     }
  873.     public function setIdFile(?string $idFile): self
  874.     {
  875.         $this->idFile $idFile;
  876.         return $this;
  877.     }
  878.     public function getPassportFile(): ?string
  879.     {
  880.         return $this->passportFile;
  881.     }
  882.     public function setPassportFile(?string $passportFile): self
  883.     {
  884.         $this->passportFile $passportFile;
  885.         return $this;
  886.     }
  887.     public function getEmploymentPassFile(): ?string
  888.     {
  889.         return $this->employmentPassFile;
  890.     }
  891.     public function setEmploymentPassFile(?string $employmentPassFile): self
  892.     {
  893.         $this->employmentPassFile $employmentPassFile;
  894.         return $this;
  895.     }
  896.     public function getPipFile(): ?string
  897.     {
  898.         return $this->pipFile;
  899.     }
  900.     public function setPipFile(?string $pipFile): self
  901.     {
  902.         $this->pipFile $pipFile;
  903.         return $this;
  904.     }  
  905.     public function getPipExtensionDate(): ?\DateTimeInterface
  906.     {
  907.         return $this->pipExtensionDate;
  908.     }
  909.     public function setPipExtensionDate(?\DateTimeInterface $pipExtensionDate): self
  910.     {
  911.         $this->pipExtensionDate $pipExtensionDate;
  912.         return $this;
  913.     }
  914.      
  915.     public function getPipDate(): ?\DateTimeInterface
  916.     {
  917.         return $this->pipDate;
  918.     }
  919.     public function setPipDate(?\DateTimeInterface $pipDate): self
  920.     {
  921.         $this->pipDate $pipDate;
  922.         return $this;
  923.     }
  924.     public function getPipEndDate(): ?\DateTimeInterface
  925.     {
  926.         return $this->pipEndDate;
  927.     }
  928.     public function setPipEndDate(?\DateTimeInterface $pipEndDate): self
  929.     {
  930.         $this->pipEndDate $pipEndDate;
  931.         return $this;
  932.     }
  933.     public function getRecruitApplicant(): ?RecruitApplication
  934.     {
  935.         return $this->recruitApplicant;
  936.     }
  937.     public function setRecruitApplicant(?RecruitApplication $recruitApplicant): self
  938.     {
  939.         $this->recruitApplicant $recruitApplicant;
  940.         return $this;
  941.     }
  942.     public function getTaxFile(): ?string
  943.     {
  944.         return $this->taxFile;
  945.     }
  946.     public function setTaxFile(?string $taxFile): self
  947.     {
  948.         $this->taxFile $taxFile;
  949.         return $this;
  950.     }
  951. }