src/Entity/ParTipoNorma.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParTipoNormaRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. #[ORM\Entity(repositoryClassParTipoNormaRepository::class)]
  9. class ParTipoNorma {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $nombre null;
  16.     #[ORM\Column(length20)]
  17.     private ?string $sigla null;
  18.     #[ORM\Column(length20)]
  19.     private ?string $createUser null;
  20.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  21.     private ?\DateTimeInterface $createAt null;
  22.     #[ORM\Column(length20)]
  23.     private ?string $updateUser null;
  24.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  25.     private ?\DateTimeInterface $updateAt null;
  26.     #[ORM\OneToMany(mappedBy'tipoNorma'targetEntityJurNorma::class)]
  27.     private Collection $norma;
  28.     public function __toString() {
  29.         return $this->getSigla();
  30.     }
  31.     
  32.     public function __construct() {
  33.         $this->norma = new ArrayCollection();
  34.     }
  35.     
  36.     public function getId(): ?int {
  37.         return $this->id;
  38.     }
  39.     public function getNombre(): ?string {
  40.         return $this->nombre;
  41.     }
  42.     public function setNombre(string $nombre): static {
  43.         $this->nombre $nombre;
  44.         return $this;
  45.     }
  46.     public function getSigla(): ?string {
  47.         return $this->sigla;
  48.     }
  49.     public function setSigla(string $sigla): static {
  50.         $this->sigla $sigla;
  51.         return $this;
  52.     }
  53.     public function getCreateUser(): ?string {
  54.         return $this->createUser;
  55.     }
  56.     public function setCreateUser(string $createUser): static {
  57.         $this->createUser $createUser;
  58.         return $this;
  59.     }
  60.     public function getCreateAt(): ?\DateTimeInterface {
  61.         return $this->createAt;
  62.     }
  63.     public function setCreateAt(\DateTimeInterface $createAt): static {
  64.         $this->createAt $createAt;
  65.         return $this;
  66.     }
  67.     public function getUpdateUser(): ?string {
  68.         return $this->updateUser;
  69.     }
  70.     public function setUpdateUser(string $updateUser): static {
  71.         $this->updateUser $updateUser;
  72.         return $this;
  73.     }
  74.     public function getUpdateAt(): ?\DateTimeInterface {
  75.         return $this->updateAt;
  76.     }
  77.     public function setUpdateAt(\DateTimeInterface $updateAt): static {
  78.         $this->updateAt $updateAt;
  79.         return $this;
  80.     }
  81.     /**
  82.      * @return Collection<int, JurNorma>
  83.      */
  84.     public function getNorma(): Collection {
  85.         return $this->norma;
  86.     }
  87.     public function addNorma(JurNorma $norma): static {
  88.         if (!$this->norma->contains($norma)) {
  89.             $this->norma->add($norma);
  90.             $norma->setTipoNorma($this);
  91.         }
  92.         return $this;
  93.     }
  94.     public function removeNorma(JurNorma $norma): static {
  95.         if ($this->norma->removeElement($norma)) {
  96.             // set the owning side to null (unless already changed)
  97.             if ($norma->getTipoNorma() === $this) {
  98.                 $norma->setTipoNorma(null);
  99.             }
  100.         }
  101.         return $this;
  102.     }
  103. }