<?phpnamespace App\Entity;use App\Repository\ParTipoNormaRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;#[ORM\Entity(repositoryClass: ParTipoNormaRepository::class)]class ParTipoNorma { #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $nombre = null; #[ORM\Column(length: 20)] private ?string $sigla = null; #[ORM\Column(length: 20)] private ?string $createUser = null; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $createAt = null; #[ORM\Column(length: 20)] private ?string $updateUser = null; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $updateAt = null; #[ORM\OneToMany(mappedBy: 'tipoNorma', targetEntity: JurNorma::class)] private Collection $norma; public function __toString() { return $this->getSigla(); } public function __construct() { $this->norma = new ArrayCollection(); } 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 getSigla(): ?string { return $this->sigla; } public function setSigla(string $sigla): static { $this->sigla = $sigla; return $this; } public function getCreateUser(): ?string { return $this->createUser; } public function setCreateUser(string $createUser): static { $this->createUser = $createUser; return $this; } public function getCreateAt(): ?\DateTimeInterface { return $this->createAt; } public function setCreateAt(\DateTimeInterface $createAt): static { $this->createAt = $createAt; return $this; } public function getUpdateUser(): ?string { return $this->updateUser; } public function setUpdateUser(string $updateUser): static { $this->updateUser = $updateUser; return $this; } public function getUpdateAt(): ?\DateTimeInterface { return $this->updateAt; } public function setUpdateAt(\DateTimeInterface $updateAt): static { $this->updateAt = $updateAt; return $this; } /** * @return Collection<int, JurNorma> */ public function getNorma(): Collection { return $this->norma; } public function addNorma(JurNorma $norma): static { if (!$this->norma->contains($norma)) { $this->norma->add($norma); $norma->setTipoNorma($this); } return $this; } public function removeNorma(JurNorma $norma): static { if ($this->norma->removeElement($norma)) { // set the owning side to null (unless already changed) if ($norma->getTipoNorma() === $this) { $norma->setTipoNorma(null); } } return $this; }}