<?phpnamespace App\Domain\Entity;use DateTime;use DateTimeInterface;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Uid\Uuid;use Symfony\Component\Validator\Constraints as Assert;class CentroTrabajo{ /** * @var string|null * @Assert\NotBlank(message="not_blank") */ private ?string $nombre = null; private ?Uuid $id = null; /** * @var string|null * @Assert\NotBlank(message="not_blank") */ private ?Empresa $empresa = null; private ?DateTimeInterface $createdAt = null; private ?DateTimeInterface $updatedAt = null; private ?DateTimeInterface $deletedAt = null; public function __clone(): void { $this->id = null; $this->setCreatedAt(new DateTime('now')); $this->setUpdatedAt(new DateTime('now')); } public function __toString(): string { return $this->getNombre()??'---'; } public function getNombre(): ?string { return $this->nombre; } public function setNombre(?string $nombre): static { $this->nombre = $nombre; return $this; } public function getId(): ?Uuid { return $this->id; } public function getEmpresa(): ?Empresa { return $this->empresa; } public function setEmpresa(?Empresa $empresa): static { $this->empresa = $empresa; return $this; } public function getCreatedAt(): ?DateTimeInterface { return $this->createdAt; } public function setCreatedAt(DateTimeInterface $createdAt): static { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(DateTimeInterface $updatedAt): static { $this->updatedAt = $updatedAt; return $this; } public function getDeletedAt(): ?DateTimeInterface { return $this->deletedAt; } public function setDeletedAt(?DateTimeInterface $deletedAt): static { $this->deletedAt = $deletedAt; return $this; }}