src/Entity/StaffFamilyMember.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StaffFamilyMemberRepository;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. #[ORM\Entity(repositoryClassStaffFamilyMemberRepository::class), ORM\Table(name'staff_family_members')]
  8. class StaffFamilyMember
  9. {
  10.     #[ORM\IdORM\GeneratedValueORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\Column(type'string'length255), Assert\NotBlank]
  13.     private $firstName;
  14.     #[ORM\Column(type'string'length255), Assert\NotBlank]
  15.     private $middleName;
  16.     #[ORM\Column(type'string'length255), Assert\NotBlank]
  17.     private $surname;
  18.     #[ORM\ManyToOne(targetEntityStaffProfile::class, inversedBy'familyMembers'), ORM\JoinColumn(nullablefalse)]
  19.     private $profile;
  20.     #[ORM\Column(type'string'length50), Assert\NotBlank]
  21.     private $relation;
  22.     #[ORM\Column(type'date'), Assert\NotBlank]
  23.     private $dob;
  24.     #[ORM\Column(type'string'columnDefinition"enum('Male', 'Female', 'Other')"), Assert\NotBlank]
  25.     private $gender;
  26.     #[ORM\Column(type'string'length100)]
  27.     private $photo;
  28.     #[ORM\Column(type'string'length190nullabletrue), Assert\Email]
  29.     private $email;
  30.     #[ORM\Column(type'string'length15)]
  31.     private $phone;
  32.     #[ORM\Column(type'boolean')]
  33.     private bool $isAlive true;
  34.     #[ORM\Column(type'boolean')]
  35.     private bool $isNominee false;
  36.     #[ORM\Column(type'boolean')]
  37.     private bool $isEmergency false;
  38.     #[ORM\Column(type'text'), Assert\NotBlank]
  39.     private $localAddress;
  40.     #[ORM\Column(type'text'), Assert\NotBlank]
  41.     private $hometownAddress;
  42.     #[ORM\Column(type'string'length100nullabletrue)]
  43.     private $nomineeDoc;
  44.     #[Gedmo\Timestampable(on'create'), ORM\Column(type'datetime')]
  45.     private $createdAt;
  46.     #[Gedmo\Timestampable(on'update'), ORM\Column(type'datetime')]
  47.     private $updatedAt;
  48.     public function getId(): ?int
  49.     {
  50.         return $this->id;
  51.     }
  52.     public function getFirstName(): ?string
  53.     {
  54.         return $this->firstName;
  55.     }
  56.     public function setFirstName(string $firstName): self
  57.     {
  58.         $this->firstName strip_tags($firstName);
  59.         return $this;
  60.     }
  61.     public function getMiddleName(): ?string
  62.     {
  63.         return $this->middleName;
  64.     }
  65.     public function setMiddleName(string $middleName): self
  66.     {
  67.         $this->middleName strip_tags($middleName);
  68.         return $this;
  69.     }
  70.     public function getSurname(): ?string
  71.     {
  72.         return $this->surname;
  73.     }
  74.     public function setSurname(string $surname): self
  75.     {
  76.         $this->surname strip_tags($surname);
  77.         return $this;
  78.     }
  79.     public function getProfile(): ?StaffProfile
  80.     {
  81.         return $this->profile;
  82.     }
  83.     public function setProfile(?StaffProfile $profile): self
  84.     {
  85.         $this->profile $profile;
  86.         return $this;
  87.     }
  88.     public function getRelation(): ?string
  89.     {
  90.         return $this->relation;
  91.     }
  92.     public function setRelation(string $relation): self
  93.     {
  94.         $this->relation $relation;
  95.         return $this;
  96.     }
  97.     public function getDob(): ?\DateTimeInterface
  98.     {
  99.         return $this->dob;
  100.     }
  101.     public function setDob(\DateTimeInterface $dob): self
  102.     {
  103.         $this->dob $dob;
  104.         return $this;
  105.     }
  106.     public function getGender(): ?string
  107.     {
  108.         return $this->gender;
  109.     }
  110.     public function setGender(?string $gender): self
  111.     {
  112.         $this->gender $gender;
  113.         return $this;
  114.     }
  115.     public function getPhoto(): ?string
  116.     {
  117.         return $this->photo;
  118.     }
  119.     public function setPhoto(?string $photo): self
  120.     {
  121.         $this->photo $photo;
  122.         return $this;
  123.     }
  124.     public function getEmail(): ?string
  125.     {
  126.         return $this->email;
  127.     }
  128.     public function setEmail(?string $email): self
  129.     {
  130.         $this->email strip_tags($email);
  131.         return $this;
  132.     }
  133.     public function getPhone(): ?string
  134.     {
  135.         return $this->phone;
  136.     }
  137.     public function setPhone(string $phone): self
  138.     {
  139.         $this->phone $phone;
  140.         return $this;
  141.     }
  142.     public function getIsAlive(): ?bool
  143.     {
  144.         return $this->isAlive;
  145.     }
  146.     public function setIsAlive(bool $isAlive): self
  147.     {
  148.         $this->isAlive $isAlive;
  149.         return $this;
  150.     }
  151.     public function getIsNominee(): ?bool
  152.     {
  153.         return $this->isNominee;
  154.     }
  155.     public function setIsNominee(bool $isNominee): self
  156.     {
  157.         $this->isNominee $isNominee;
  158.         return $this;
  159.     }
  160.     public function getIsEmergency(): ?bool
  161.     {
  162.         return $this->isEmergency;
  163.     }
  164.     public function setIsEmergency(bool $isEmergency): self
  165.     {
  166.         $this->isEmergency $isEmergency;
  167.         return $this;
  168.     }
  169.     public function getLocalAddress(): ?string
  170.     {
  171.         return $this->localAddress;
  172.     }
  173.     public function setLocalAddress(string $localAddress): self
  174.     {
  175.         $this->localAddress strip_tags($localAddress);
  176.         return $this;
  177.     }
  178.     public function getHometownAddress(): ?string
  179.     {
  180.         return $this->hometownAddress;
  181.     }
  182.     public function setHometownAddress(string $hometownAddress): self
  183.     {
  184.         $this->hometownAddress strip_tags($hometownAddress);
  185.         return $this;
  186.     }
  187.     public function getNomineeDoc(): ?string
  188.     {
  189.         return $this->nomineeDoc;
  190.     }
  191.     public function setNomineeDoc(string $nomineeDoc): self
  192.     {
  193.         $this->nomineeDoc $nomineeDoc;
  194.         return $this;
  195.     }
  196.     public function getCreatedAt(): ?\DateTimeInterface
  197.     {
  198.         return $this->createdAt;
  199.     }
  200.     public function getUpdatedAt(): ?\DateTimeInterface
  201.     {
  202.         return $this->updatedAt;
  203.     }
  204. }