<?php
namespace App\Entity;
use App\Repository\IdentiteRepository;
use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=IdentiteRepository::class)
* @Auditable()
*/
class Identite
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=50)
*/
private $lastname;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $postname;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $firstname;
/**
* @ORM\Column(type="string", length=255)
*/
private $birthPlace;
/**
* @ORM\Column(type="date")
*/
private $birthDate;
/**
* @ORM\Column(type="boolean")
*/
private $isDeleted;
/**
* @ORM\Column(type="string", length=10)
*/
private $sexe;
/**
* @ORM\ManyToOne(targetEntity=Pcode::class)
*/
private $origine;
/**
* @ORM\Column(type="blob", nullable=true)
* @ORM\JoinColumn(nullable=true)
*/
private $photo;
/**
* @ORM\Column(type="datetime")
*/
private $dateCreate;
/**
* @ORM\Column(type="datetime", nullable=true)
* @ORM\JoinColumn(nullable=false)
*/
private $dateUpdate;
/**
* @ORM\ManyToOne(targetEntity=Users::class)
* @ORM\JoinColumn(nullable=false)
*/
private $userCreate;
/**
* @ORM\ManyToOne(targetEntity=Users::class)
* @ORM\JoinColumn(nullable=true)
*/
private $userUpdate;
/**
* @ORM\ManyToOne(targetEntity=Pcode::class)
*/
private $nationality;
/**
* @ORM\ManyToOne(targetEntity=Profession::class)
*/
private $profession;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $registrationNumber;
/**
* @ORM\Column(type="string", length=1000, nullable=true)
*/
private $origineText;
/**
* @ORM\Column(type="string", length=1000, nullable=true)
*/
private $adresse;
/**
* @ORM\ManyToOne(targetEntity=Sites::class)
*/
private $registrationSite;
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $civilite;
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $eCivil;
public function __construct()
{
$this->isDeleted = false;
$this->dateCreate = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getLastname(): ?string
{
return $this->lastname;
}
public function setLastname(string $lastname): self
{
$this->lastname = $lastname;
return $this;
}
public function getPostname(): ?string
{
return $this->postname;
}
public function setPostname(string $postname): self
{
$this->postname = $postname;
return $this;
}
public function getFirstname(): ?string
{
return $this->firstname;
}
public function setFirstname(string $firstname): self
{
$this->firstname = $firstname;
return $this;
}
public function getBirthPlace(): ?string
{
return $this->birthPlace;
}
public function setBirthPlace(string $birthPlace): self
{
$this->birthPlace = $birthPlace;
return $this;
}
public function getBirthDate(): ?\DateTimeInterface
{
return $this->birthDate;
}
public function setBirthDate(\DateTimeInterface $birthDate): self
{
$this->birthDate = $birthDate;
return $this;
}
public function getIsDeleted(): ?bool
{
return $this->isDeleted;
}
public function setIsDeleted(bool $isDeleted): self
{
$this->isDeleted = $isDeleted;
return $this;
}
public function getSexe(): ?string
{
return $this->sexe;
}
public function setSexe(string $sexe): self
{
$this->sexe = $sexe;
return $this;
}
public function getOrigine(): ?Pcode
{
return $this->origine;
}
public function setOrigine(?Pcode $origine): self
{
$this->origine = $origine;
return $this;
}
public function getPhoto()
{
return $this->photo;
}
public function setPhoto($photo): self
{
$this->photo = $photo;
return $this;
}
public function getDateCreate(): ?\DateTimeInterface
{
return $this->dateCreate;
}
public function setDateCreate(\DateTimeInterface $dateCreate): self
{
$this->dateCreate = $dateCreate;
return $this;
}
public function getDateUpdate(): ?\DateTimeInterface
{
return $this->dateUpdate;
}
public function setDateUpdate(?\DateTimeInterface $dateUpdate): self
{
$this->dateUpdate = $dateUpdate;
return $this;
}
public function getUserCreate(): ?Users
{
return $this->userCreate;
}
public function setUserCreate(?Users $userCreate): self
{
$this->userCreate = $userCreate;
return $this;
}
public function getUserUpdate(): ?Users
{
return $this->userUpdate;
}
public function setUserUpdate(?Users $userUpdate): self
{
$this->userUpdate = $userUpdate;
return $this;
}
public function getFullName(): ?string
{
return mb_strtoupper($this->lastname)." ".mb_strtoupper($this->postname)." ".$this->firstname;
}
public function getNationality(): ?Pcode
{
return $this->nationality;
}
public function setNationality(?Pcode $nationality): self
{
$this->nationality = $nationality;
return $this;
}
public function getProfession(): ?Profession
{
return $this->profession;
}
public function setProfession(?Profession $profession): self
{
$this->profession = $profession;
return $this;
}
public function getRegistrationNumber(): ?string
{
return $this->registrationNumber;
}
public function setRegistrationNumber(?string $registrationNumber): self
{
$this->registrationNumber = $registrationNumber;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getOrigineText(): ?string
{
return $this->origineText;
}
public function setOrigineText(?string $origineText): self
{
$this->origineText = $origineText;
return $this;
}
public function getRegistrationSite(): ?Sites
{
return $this->registrationSite;
}
public function setRegistrationSite(?Sites $registrationSite): self
{
$this->registrationSite = $registrationSite;
return $this;
}
public function getCivilite(): ?string
{
return $this->civilite;
}
public function setCivilite(?string $civilite): self
{
$this->civilite = $civilite;
return $this;
}
public function getEcivil(): ?string
{
return $this->eCivil;
}
public function setEcivil(?string $eCivil): self
{
$this->eCivil = $eCivil;
return $this;
}
}