src/Entity/ParActividadEconomica.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParActividadEconomicaRepository;
  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(repositoryClassParActividadEconomicaRepository::class)]
  9. class ParActividadEconomica
  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\OneToMany(mappedBy'actividadEconomica'targetEntityTerProveedor::class)]
  18.     private Collection $proveedor;
  19.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  20.     private ?\DateTimeInterface $createAt null;
  21.     #[ORM\Column(length50)]
  22.     private ?string $createUser null;
  23.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  24.     private ?\DateTimeInterface $updateAt null;
  25.     #[ORM\Column(length50)]
  26.     private ?string $updateUser null;
  27.     public function __toString(): string {
  28.         return $this->getNombre();
  29.     }
  30.     
  31.     public function __construct()
  32.     {
  33.         $this->proveedor = new ArrayCollection();
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getNombre(): ?string
  40.     {
  41.         return $this->nombre;
  42.     }
  43.     public function setNombre(string $nombre): static
  44.     {
  45.         $this->nombre $nombre;
  46.         return $this;
  47.     }
  48.     /**
  49.      * @return Collection<int, TerProveedor>
  50.      */
  51.     public function getProveedor(): Collection
  52.     {
  53.         return $this->proveedor;
  54.     }
  55.     public function addProveedor(TerProveedor $proveedor): static
  56.     {
  57.         if (!$this->proveedor->contains($proveedor)) {
  58.             $this->proveedor->add($proveedor);
  59.             $proveedor->setActividadEconomica($this);
  60.         }
  61.         return $this;
  62.     }
  63.     public function removeProveedor(TerProveedor $proveedor): static
  64.     {
  65.         if ($this->proveedor->removeElement($proveedor)) {
  66.             // set the owning side to null (unless already changed)
  67.             if ($proveedor->getActividadEconomica() === $this) {
  68.                 $proveedor->setActividadEconomica(null);
  69.             }
  70.         }
  71.         return $this;
  72.     }
  73.     public function getCreateAt(): ?\DateTimeInterface
  74.     {
  75.         return $this->createAt;
  76.     }
  77.     public function setCreateAt(\DateTimeInterface $createAt): static
  78.     {
  79.         $this->createAt $createAt;
  80.         return $this;
  81.     }
  82.     public function getCreateUser(): ?string
  83.     {
  84.         return $this->createUser;
  85.     }
  86.     public function setCreateUser(string $createUser): static
  87.     {
  88.         $this->createUser $createUser;
  89.         return $this;
  90.     }
  91.     public function getUpdateAt(): ?\DateTimeInterface
  92.     {
  93.         return $this->updateAt;
  94.     }
  95.     public function setUpdateAt(\DateTimeInterface $updateAt): static
  96.     {
  97.         $this->updateAt $updateAt;
  98.         return $this;
  99.     }
  100.     public function getUpdateUser(): ?string
  101.     {
  102.         return $this->updateUser;
  103.     }
  104.     public function setUpdateUser(string $Updateuser): static
  105.     {
  106.         $this->updateUser $Updateuser;
  107.         return $this;
  108.     }
  109. }