<?phpnamespace App\Entity;use App\Repository\TerAreaSedeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: TerAreaSedeRepository::class)]class TerAreaSede{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $nombre = null; #[ORM\ManyToOne(inversedBy: 'areaSede')] private ?TerSedeEmpresa $sede = null; #[ORM\OneToMany(mappedBy: 'areaSede', targetEntity: SegControlAcceso::class)] private Collection $controlAcceso; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $createAt = null; #[ORM\Column(length: 50)] private ?string $createUser = null; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $updateAt = null; #[ORM\Column(length: 50)] private ?string $Updateuser = null; public function __construct() { $this->controlAcceso = new ArrayCollection(); } public function __toString(): string { return $this->getNombre(); } public function getId(): ?int { return $this->id; } public function getNombre(): ?string { return $this->nombre; } public function setNombre(string $nombre): static { $this->nombre = $nombre; return $this; } public function getSede(): ?TerSedeEmpresa { return $this->sede; } public function setSede(?TerSedeEmpresa $sede): static { $this->sede = $sede; return $this; } /** * @return Collection<int, SegControlAcceso> */ public function getControlAcceso(): Collection { return $this->controlAcceso; } public function addControlAcceso(SegControlAcceso $controlAcceso): static { if (!$this->controlAcceso->contains($controlAcceso)) { $this->controlAcceso->add($controlAcceso); $controlAcceso->setAreaSede($this); } return $this; } public function removeControlAcceso(SegControlAcceso $controlAcceso): static { if ($this->controlAcceso->removeElement($controlAcceso)) { // set the owning side to null (unless already changed) if ($controlAcceso->getAreaSede() === $this) { $controlAcceso->setAreaSede(null); } } return $this; } public function getCreateAt(): ?\DateTimeInterface { return $this->createAt; } public function setCreateAt(\DateTimeInterface $createAt): static { $this->createAt = $createAt; return $this; } public function getCreateUser(): ?string { return $this->createUser; } public function setCreateUser(string $createUser): static { $this->createUser = $createUser; return $this; } public function getUpdateAt(): ?\DateTimeInterface { return $this->updateAt; } public function setUpdateAt(\DateTimeInterface $updateAt): static { $this->updateAt = $updateAt; return $this; } public function getUpdateuser(): ?string { return $this->Updateuser; } public function setUpdateuser(string $Updateuser): static { $this->Updateuser = $Updateuser; return $this; }}