<?php
namespace App\Entity;
use App\Repository\StaffFamilyMemberRepository;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: StaffFamilyMemberRepository::class), ORM\Table(name: 'staff_family_members')]
class StaffFamilyMember
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255), Assert\NotBlank]
private $firstName;
#[ORM\Column(type: 'string', length: 255), Assert\NotBlank]
private $middleName;
#[ORM\Column(type: 'string', length: 255), Assert\NotBlank]
private $surname;
#[ORM\ManyToOne(targetEntity: StaffProfile::class, inversedBy: 'familyMembers'), ORM\JoinColumn(nullable: false)]
private $profile;
#[ORM\Column(type: 'string', length: 50), Assert\NotBlank]
private $relation;
#[ORM\Column(type: 'date'), Assert\NotBlank]
private $dob;
#[ORM\Column(type: 'string', columnDefinition: "enum('Male', 'Female', 'Other')"), Assert\NotBlank]
private $gender;
#[ORM\Column(type: 'string', length: 100)]
private $photo;
#[ORM\Column(type: 'string', length: 190, nullable: true), Assert\Email]
private $email;
#[ORM\Column(type: 'string', length: 15)]
private $phone;
#[ORM\Column(type: 'boolean')]
private bool $isAlive = true;
#[ORM\Column(type: 'boolean')]
private bool $isNominee = false;
#[ORM\Column(type: 'boolean')]
private bool $isEmergency = false;
#[ORM\Column(type: 'text'), Assert\NotBlank]
private $localAddress;
#[ORM\Column(type: 'text'), Assert\NotBlank]
private $hometownAddress;
#[ORM\Column(type: 'string', length: 100, nullable: true)]
private $nomineeDoc;
#[Gedmo\Timestampable(on: 'create'), ORM\Column(type: 'datetime')]
private $createdAt;
#[Gedmo\Timestampable(on: 'update'), ORM\Column(type: 'datetime')]
private $updatedAt;
public function getId(): ?int
{
return $this->id;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(string $firstName): self
{
$this->firstName = strip_tags($firstName);
return $this;
}
public function getMiddleName(): ?string
{
return $this->middleName;
}
public function setMiddleName(string $middleName): self
{
$this->middleName = strip_tags($middleName);
return $this;
}
public function getSurname(): ?string
{
return $this->surname;
}
public function setSurname(string $surname): self
{
$this->surname = strip_tags($surname);
return $this;
}
public function getProfile(): ?StaffProfile
{
return $this->profile;
}
public function setProfile(?StaffProfile $profile): self
{
$this->profile = $profile;
return $this;
}
public function getRelation(): ?string
{
return $this->relation;
}
public function setRelation(string $relation): self
{
$this->relation = $relation;
return $this;
}
public function getDob(): ?\DateTimeInterface
{
return $this->dob;
}
public function setDob(\DateTimeInterface $dob): self
{
$this->dob = $dob;
return $this;
}
public function getGender(): ?string
{
return $this->gender;
}
public function setGender(?string $gender): self
{
$this->gender = $gender;
return $this;
}
public function getPhoto(): ?string
{
return $this->photo;
}
public function setPhoto(?string $photo): self
{
$this->photo = $photo;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = strip_tags($email);
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getIsAlive(): ?bool
{
return $this->isAlive;
}
public function setIsAlive(bool $isAlive): self
{
$this->isAlive = $isAlive;
return $this;
}
public function getIsNominee(): ?bool
{
return $this->isNominee;
}
public function setIsNominee(bool $isNominee): self
{
$this->isNominee = $isNominee;
return $this;
}
public function getIsEmergency(): ?bool
{
return $this->isEmergency;
}
public function setIsEmergency(bool $isEmergency): self
{
$this->isEmergency = $isEmergency;
return $this;
}
public function getLocalAddress(): ?string
{
return $this->localAddress;
}
public function setLocalAddress(string $localAddress): self
{
$this->localAddress = strip_tags($localAddress);
return $this;
}
public function getHometownAddress(): ?string
{
return $this->hometownAddress;
}
public function setHometownAddress(string $hometownAddress): self
{
$this->hometownAddress = strip_tags($hometownAddress);
return $this;
}
public function getNomineeDoc(): ?string
{
return $this->nomineeDoc;
}
public function setNomineeDoc(string $nomineeDoc): self
{
$this->nomineeDoc = $nomineeDoc;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
}