<?php
declare(strict_types=1);
namespace App\Entity;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="client")
*/
class Client
{
/**
* @ORM\Id
* @ORM\Column(type="integer", options={"unsigned":true})
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $phone = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $password = null;
/**
* @ORM\Column(type="string", length=30)
*/
private ?string $userNumber = null;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private ?string $firstName = null;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private ?string $lastName = null;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private ?string $middleName = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private ?DateTime $dateOfBirth = null;
/**
* @ORM\Column(type="string", length=30, nullable=true)
*/
private ?string $passportNumber = null;
/**
* @ORM\Column(type="string", length=60, nullable=true)
*/
private ?string $passportId = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private ?DateTime $passportIssueDate = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $passportIssuingAuthority = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $registrationAddress = null;
/**
* @ORM\Column(type="string", length=30, nullable=true)
*/
private ?string $driversLicenseNumber = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private ?DateTime $driversLicenseDate = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private ?DateTime $dateSigningContract = null;
/**
* @ORM\OneToMany(targetEntity=Reserve::class, mappedBy="client")
*/
private Collection $reserves;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $notes;
public function __construct()
{
$this->reserves = new ArrayCollection();
}
public function getUserNumber(): ?string
{
return $this->userNumber;
}
public function setUserNumber(?string $userNumber): void
{
$this->userNumber = $userNumber;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): void
{
$this->phone = $phone;
}
public function getPassword(): ?string
{
return $this->password;
}
public function setPassword(?string $password): void
{
$this->password = $password;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(?string $firstName): void
{
$this->firstName = $firstName;
}
public function getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(?string $lastName): void
{
$this->lastName = $lastName;
}
public function getMiddleName(): ?string
{
return $this->middleName;
}
public function setMiddleName(?string $middleName): void
{
$this->middleName = $middleName;
}
public function getReserves(): Collection
{
return $this->reserves;
}
public function setReserves(Collection $reserves): void
{
$this->reserves = $reserves;
}
public function __toString(): string
{
return sprintf(
'(%s) %s %s %s',
$this->getUserNumber(),
$this->getFirstName(),
$this->getLastName(),
$this->getMiddleName(),
);
}
public function getFio(): string
{
return sprintf('%s %s %s', $this->getFirstName(), $this->getLastName(), $this->getMiddleName());
}
public function getPassportIssueDate(): ?DateTime
{
return $this->passportIssueDate;
}
public function setPassportIssueDate(?DateTime $passportIssueDate): void
{
$this->passportIssueDate = $passportIssueDate;
}
public function getDriversLicenseDate(): ?DateTime
{
return $this->driversLicenseDate;
}
public function setDriversLicenseDate(?DateTime $driversLicenseDate): void
{
$this->driversLicenseDate = $driversLicenseDate;
}
public function getPassportNumber(): ?string
{
return $this->passportNumber;
}
public function setPassportNumber(?string $passportNumber): void
{
$this->passportNumber = $passportNumber;
}
public function getPassportId(): ?string
{
return $this->passportId;
}
public function setPassportId(?string $passportId): void
{
$this->passportId = $passportId;
}
public function getDateSigningContract(): ?DateTime
{
return $this->dateSigningContract;
}
public function setDateSigningContract(?DateTime $dateSigningContract): void
{
$this->dateSigningContract = $dateSigningContract;
}
public function getPassportIssuingAuthority(): ?string
{
return $this->passportIssuingAuthority;
}
public function setPassportIssuingAuthority(?string $passportIssuingAuthority): void
{
$this->passportIssuingAuthority = $passportIssuingAuthority;
}
public function getRegistrationAddress(): ?string
{
return $this->registrationAddress;
}
public function setRegistrationAddress(?string $registrationAddress): void
{
$this->registrationAddress = $registrationAddress;
}
public function getDriversLicenseNumber(): ?string
{
return $this->driversLicenseNumber;
}
public function setDriversLicenseNumber(?string $driversLicenseNumber): void
{
$this->driversLicenseNumber = $driversLicenseNumber;
}
public function getDateOfBirth(): ?DateTime
{
return $this->dateOfBirth;
}
public function setDateOfBirth(?DateTime $dateOfBirth): void
{
$this->dateOfBirth = $dateOfBirth;
}
public function getId(): int
{
return $this->id;
}
public function getNotes(): ?string
{
return $this->notes;
}
public function setNotes(?string $notes): self
{
$this->notes = $notes;
return $this;
}
}