src/Entity/TerAreaSede.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TerAreaSedeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassTerAreaSedeRepository::class)]
  9. class TerAreaSede
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $nombre null;
  17.     #[ORM\ManyToOne(inversedBy'areaSede')]
  18.     private ?TerSedeEmpresa $sede null;
  19.     #[ORM\OneToMany(mappedBy'areaSede'targetEntitySegControlAcceso::class)]
  20.     private Collection $controlAcceso;
  21.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  22.     private ?\DateTimeInterface $createAt null;
  23.     #[ORM\Column(length50)]
  24.     private ?string $createUser null;
  25.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  26.     private ?\DateTimeInterface $updateAt null;
  27.     #[ORM\Column(length50)]
  28.     private ?string $Updateuser null;
  29.     public function __construct()
  30.     {
  31.         $this->controlAcceso = new ArrayCollection();
  32.     }
  33.     
  34.      public function __toString(): string {
  35.         return  $this->getNombre();
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getNombre(): ?string
  42.     {
  43.         return $this->nombre;
  44.     }
  45.     public function setNombre(string $nombre): static
  46.     {
  47.         $this->nombre $nombre;
  48.         return $this;
  49.     }
  50.     public function getSede(): ?TerSedeEmpresa
  51.     {
  52.         return $this->sede;
  53.     }
  54.     public function setSede(?TerSedeEmpresa $sede): static
  55.     {
  56.         $this->sede $sede;
  57.         return $this;
  58.     }
  59.     /**
  60.      * @return Collection<int, SegControlAcceso>
  61.      */
  62.     public function getControlAcceso(): Collection
  63.     {
  64.         return $this->controlAcceso;
  65.     }
  66.     public function addControlAcceso(SegControlAcceso $controlAcceso): static
  67.     {
  68.         if (!$this->controlAcceso->contains($controlAcceso)) {
  69.             $this->controlAcceso->add($controlAcceso);
  70.             $controlAcceso->setAreaSede($this);
  71.         }
  72.         return $this;
  73.     }
  74.     public function removeControlAcceso(SegControlAcceso $controlAcceso): static
  75.     {
  76.         if ($this->controlAcceso->removeElement($controlAcceso)) {
  77.             // set the owning side to null (unless already changed)
  78.             if ($controlAcceso->getAreaSede() === $this) {
  79.                 $controlAcceso->setAreaSede(null);
  80.             }
  81.         }
  82.         return $this;
  83.     }
  84.     public function getCreateAt(): ?\DateTimeInterface
  85.     {
  86.         return $this->createAt;
  87.     }
  88.     public function setCreateAt(\DateTimeInterface $createAt): static
  89.     {
  90.         $this->createAt $createAt;
  91.         return $this;
  92.     }
  93.     public function getCreateUser(): ?string
  94.     {
  95.         return $this->createUser;
  96.     }
  97.     public function setCreateUser(string $createUser): static
  98.     {
  99.         $this->createUser $createUser;
  100.         return $this;
  101.     }
  102.     public function getUpdateAt(): ?\DateTimeInterface
  103.     {
  104.         return $this->updateAt;
  105.     }
  106.     public function setUpdateAt(\DateTimeInterface $updateAt): static
  107.     {
  108.         $this->updateAt $updateAt;
  109.         return $this;
  110.     }
  111.     public function getUpdateuser(): ?string
  112.     {
  113.         return $this->Updateuser;
  114.     }
  115.     public function setUpdateuser(string $Updateuser): static
  116.     {
  117.         $this->Updateuser $Updateuser;
  118.         return $this;
  119.     }
  120. }