Files
sprawozdania/project/src/Entity/Clients.php
T
2025-09-27 21:09:59 +02:00

218 lines
4.8 KiB
PHP

<?php
namespace App\Entity;
use App\Enum\ReportHighlight;
use App\Repository\ClientsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ClientsRepository::class)]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE', region: 'client_cache')]
class Clients
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $strName = null;
#[ORM\Column(type: Types::BIGINT)]
private ?int $intNIP = null;
#[ORM\Column(length: 255)]
private ?string $strAddress = null;
#[ORM\Column(length: 255)]
private ?string $strEmail = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $dateLegitimacy = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $dateProclamation = null;
/**
* @var Collection<int, Schedule>
*/
#[ORM\OneToMany(targetEntity: Schedule::class, mappedBy: 'client')]
private Collection $schedules;
#[ORM\Column(options: ["default" => "0"])]
private bool $isDeleted = false;
#[ORM\Column(options: ["default" => "0"])]
private bool $isComplete = false;
#[ORM\Column(nullable: true)]
private ?int $intPhone = null;
#[ORM\Column(enumType: ReportHighlight::class, options: ["default" => "0"])]
private ReportHighlight $highlight = ReportHighlight::STANDARD;
public function __construct()
{
$this->schedules = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getStrName(): ?string
{
return $this->strName;
}
public function setStrName(string $strName): static
{
$this->strName = $strName;
return $this;
}
public function getIntNIP(): ?int
{
return $this->intNIP;
}
public function setIntNIP(int $intNIP): static
{
$this->intNIP = $intNIP;
return $this;
}
public function getStrAddress(): ?string
{
return $this->strAddress;
}
public function setStrAddress(string $strAddress): static
{
$this->strAddress = $strAddress;
return $this;
}
public function getStrEmail(): ?string
{
return $this->strEmail;
}
public function setStrEmail(string $strEmail): static
{
$this->strEmail = $strEmail;
return $this;
}
/** Data prawomocności */
public function getDateLegitimacy(): ?\DateTimeInterface
{
return $this->dateLegitimacy;
}
/** Data prawomocności */
public function setDateLegitimacy(\DateTimeInterface $dateLegitimacy): static
{
$this->dateLegitimacy = $dateLegitimacy;
return $this;
}
/** Data obwieszczenia */
public function getDateProclamation(): ?\DateTimeInterface
{
return $this->dateProclamation;
}
/** Data obwieszczenia */
public function setDateProclamation(\DateTimeInterface $dateProclamation): static
{
$this->dateProclamation = $dateProclamation;
return $this;
}
/**
* @return Collection<int, Schedule>
*/
public function getSchedules(): Collection
{
return $this->schedules;
}
public function addSchedule(Schedule $schedule): static
{
if (!$this->schedules->contains($schedule)) {
$this->schedules->add($schedule);
$schedule->setClient($this);
}
return $this;
}
public function removeSchedule(Schedule $schedule): static
{
if ($this->schedules->removeElement($schedule)) {
// set the owning side to null (unless already changed)
if ($schedule->getClient() === $this) {
$schedule->setClient(null);
}
}
return $this;
}
public function isDeleted(): bool
{
return $this->isDeleted;
}
public function setDeleted(bool $isDeleted): static
{
$this->isDeleted = $isDeleted;
return $this;
}
public function isComplete(): ?bool
{
return $this->isComplete;
}
public function setComplete(bool $isComplete): static
{
$this->isComplete = $isComplete;
return $this;
}
public function getIntPhone(): ?int
{
return $this->intPhone;
}
public function setIntPhone(?int $intPhone): static
{
$this->intPhone = $intPhone;
return $this;
}
public function getHighlight(): ReportHighlight
{
return $this->highlight;
}
public function setHighlight(ReportHighlight $highlight): static
{
$this->highlight = $highlight;
return $this;
}
}