<?php
namespace App\Entity;
use App\Repository\JurNormaRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: JurNormaRepository::class)]
class JurNorma {
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'norma')]
private ?ParTipoNorma $tipoNorma = null;
#[ORM\Column(length: 20)]
private ?string $numero = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $fechaEmision = null;
#[ORM\Column(length: 255)]
private ?string $consNorma = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $fechaVigencia = null;
#[ORM\ManyToOne(inversedBy: 'norma')]
private ?ParEstado $estado = null;
#[ORM\Column(length: 255)]
private ?string $titulo = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $palabrasClave = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $descripcion = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $comentario = null;
#[ORM\ManyToMany(targetEntity: ParProceso::class, inversedBy: 'norma')]
private Collection $procesos;
#[ORM\Column(nullable: true)]
private ?bool $sanciones = null;
#[ORM\Column(type: Types::TEXT, nullable:true)]
private ?string $tipoSancion = null;
#[ORM\Column(type: Types::DECIMAL, precision: 11, scale: 2, nullable: true)]
private ?string $montoSancion = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $linkConsulta = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $archivo = null;
#[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;
#[ORM\ManyToOne(inversedBy: 'norma')]
private ?ParEntidadEmisora $entidadEmisora = null;
#[ORM\OneToMany(mappedBy: 'norma', targetEntity: JurNormaEnvio::class)]
private Collection $normaEnvio;
#[ORM\ManyToMany(targetEntity: ParCampo::class, inversedBy: 'norma')]
private Collection $campoAplicacion;
public function __construct() {
$this->procesos = new ArrayCollection();
$this->normaEnvio = new ArrayCollection();
$this->campoAplicacion = new ArrayCollection();
}
public function getId(): ?int {
return $this->id;
}
public function getNumero(): ?string {
return $this->numero;
}
public function setNumero(string $numero): static {
$this->numero = $numero;
return $this;
}
public function getFechaEmision(): ?\DateTimeInterface {
return $this->fechaEmision;
}
public function setFechaEmision(\DateTimeInterface $fechaEmision): static {
$this->fechaEmision = $fechaEmision;
return $this;
}
public function getConsNorma(): ?string {
return $this->consNorma;
}
public function setConsNorma(string $consNorma): static {
$this->consNorma = $consNorma;
return $this;
}
public function getFechaVigencia(): ?\DateTimeInterface {
return $this->fechaVigencia;
}
public function setFechaVigencia(\DateTimeInterface $fechaVigencia): static {
$this->fechaVigencia = $fechaVigencia;
return $this;
}
public function getEstado(): ?ParEstado {
return $this->estado;
}
public function setEstado(?ParEstado $estado): static {
$this->estado = $estado;
return $this;
}
public function getTitulo(): ?string {
return $this->titulo;
}
public function setTitulo(string $titulo): static {
$this->titulo = $titulo;
return $this;
}
public function getPalabrasClave(): ?string {
return $this->palabrasClave;
}
public function setPalabrasClave(string $palabrasClave): static {
$this->palabrasClave = $palabrasClave;
return $this;
}
public function getDescripcion(): ?string {
return $this->descripcion;
}
public function setDescripcion(string $descripcion): static {
$this->descripcion = $descripcion;
return $this;
}
public function getComentario(): ?string {
return $this->comentario;
}
public function setComentario(?string $comentario): static {
$this->comentario = $comentario;
return $this;
}
/**
* @return Collection<int, ParProceso>
*/
public function getProcesos(): Collection {
return $this->procesos;
}
public function addProceso(ParProceso $proceso): static {
if (!$this->procesos->contains($proceso)) {
$this->procesos->add($proceso);
}
return $this;
}
public function removeProceso(ParProceso $proceso): static {
$this->procesos->removeElement($proceso);
return $this;
}
public function isSanciones(): ?bool {
return $this->sanciones;
}
public function setSanciones(?bool $sanciones): static {
$this->sanciones = $sanciones;
return $this;
}
public function getTipoSancion(): ?string {
return $this->tipoSancion;
}
public function setTipoSancion(string $tipoSancion): static {
$this->tipoSancion = $tipoSancion;
return $this;
}
public function getMontoSancion(): ?string {
return $this->montoSancion;
}
public function setMontoSancion(string $montoSancion): static {
$this->montoSancion = $montoSancion;
return $this;
}
public function getLinkConsulta(): ?string {
return $this->linkConsulta;
}
public function setLinkConsulta(?string $linkConsulta): static {
$this->linkConsulta = $linkConsulta;
return $this;
}
public function getArchivo(): ?string {
return $this->archivo;
}
public function setArchivo(?string $archivo): static {
$this->archivo = $archivo;
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;
}
public function getTipoNorma(): ?ParTipoNorma {
return $this->tipoNorma;
}
public function setTipoNorma(?ParTipoNorma $tipoNorma): static {
$this->tipoNorma = $tipoNorma;
return $this;
}
public function getEntidadEmisora(): ?ParEntidadEmisora
{
return $this->entidadEmisora;
}
public function setEntidadEmisora(?ParEntidadEmisora $entidadEmisora): static
{
$this->entidadEmisora = $entidadEmisora;
return $this;
}
/**
* @return Collection<int, JurNormaEnvio>
*/
public function getNormaEnvio(): Collection
{
return $this->normaEnvio;
}
public function addNormaEnvio(JurNormaEnvio $normaEnvio): static
{
if (!$this->normaEnvio->contains($normaEnvio)) {
$this->normaEnvio->add($normaEnvio);
$normaEnvio->setNorma($this);
}
return $this;
}
public function removeNormaEnvio(JurNormaEnvio $normaEnvio): static
{
if ($this->normaEnvio->removeElement($normaEnvio)) {
// set the owning side to null (unless already changed)
if ($normaEnvio->getNorma() === $this) {
$normaEnvio->setNorma(null);
}
}
return $this;
}
/**
* @return Collection<int, ParCampo>
*/
public function getCampoAplicacion(): Collection
{
return $this->campoAplicacion;
}
public function addCampoAplicacion(ParCampo $campoAplicacion): static
{
if (!$this->campoAplicacion->contains($campoAplicacion)) {
$this->campoAplicacion->add($campoAplicacion);
}
return $this;
}
public function removeCampoAplicacion(ParCampo $campoAplicacion): static
{
$this->campoAplicacion->removeElement($campoAplicacion);
return $this;
}
}