src/Entity/PcConvocatorias.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PcConvocatoriasRepository;
  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. use Symfony\Component\Validator\Constraints as Assert;
  9. #[ORM\Entity(repositoryClassPcConvocatoriasRepository::class)]
  10. class PcConvocatorias
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[Assert\NotBlank(message"El nombre no puede estar vacío")]
  17.     #[Assert\Length(max255maxMessage"El nombre no puede superar los 255 caracteres")]
  18.     #[ORM\Column(type'string'length255nullable:false)]
  19.     private $nombre;
  20.     #[Assert\Length(max800maxMessage"La descripción no puede superar los 800 caracteres")]
  21.     #[ORM\Column(type'string'length800nullable:trueuniquefalse)]
  22.     private $descripcion;
  23.     #[Assert\NotBlank(message"El año no puede estar vacío")]
  24.     #[Assert\Length(min4max4exactMessage"El año debe tener exactamente 4 caracteres")]
  25.     #[Assert\Regex(pattern"/^\d{4}$/"message"El año debe ser un valor numérico de 4 dígitos")]
  26.     #[ORM\Column(type'string'length255nullable:false)]
  27.     private $anio;
  28.     #[ORM\Column]
  29.     private ?array $bases = [];
  30.     #[ORM\Column(type"integer"nullabletrue)]
  31.     private ?int $presupuesto null;
  32.     #[ORM\Column(type'decimal'precision:10scale:2nullable:true)]
  33.     private $puntaje_eval_corte;
  34.     #[ORM\Column]
  35.     private array $cuestionarios = [];
  36.     #[ORM\Column]
  37.     private array $documentos = [];
  38.     #[Assert\Choice(choices: ["1""2""3"], message"El estado debe ser uno de los siguientes valores: 1, 2, o 3")]
  39.     #[Assert\Length(max255maxMessage"El estado no puede superar los 255 caracteres")]
  40.     #[ORM\Column(type'string'nullabletrue)]
  41.     private $estado;
  42.     #[ORM\OneToMany(mappedBy'convocatorias'targetEntity"App\Entity\PcCriteriosConvocatorias")]
  43.     private Collection $criteriosConvocatorias;
  44.     #[ORM\OneToMany(mappedBy'puntoCultura'targetEntity"App\Entity\PcPuntoCultura")]
  45.     private Collection $postulacion;
  46.     #[ORM\Column(type'boolean'nullable:true)]
  47.     private $apertura;
  48.     public function __construct()
  49.     {
  50.         $this->criteriosConvocatorias = new ArrayCollection();
  51.     }
  52.     public function getId(): ?int
  53.     {
  54.         return $this->id;
  55.     }
  56.     public function getNombre(): ?string
  57.     {
  58.         return $this->nombre;
  59.     }
  60.     public function setNombre(?string $nombre): self
  61.     {
  62.         $this->nombre $nombre;
  63.         return $this;
  64.     }
  65.     public function getDescripcion(): ?string
  66.     {
  67.         return $this->descripcion;
  68.     }
  69.     public function setDescripcion(?string $descripcion): self
  70.     {
  71.         $this->descripcion $descripcion;
  72.         return $this;
  73.     }
  74.     public function getAnio(): ?int
  75.         {
  76.             return $this->anio;
  77.         }
  78.     public function setAnio(?int $anio): self
  79.         {
  80.             $this->anio $anio;
  81.             return $this;
  82.         }
  83.     public function getBases(): ?array
  84.     {
  85.         return $this->bases;
  86.     }
  87.     public function setBases(?array $bases): self
  88.     {
  89.         $this->bases $bases;
  90.         return $this;
  91.     }
  92.     public function getPresupuesto(): ?int
  93.         {
  94.             return $this->presupuesto;
  95.         }
  96.     public function setPresupuesto(?int $presupuesto): self
  97.         {
  98.             $this->presupuesto $presupuesto;
  99.             return $this;
  100.         }
  101.     public function getPuntajeEvalCorte(): ?float
  102.         {
  103.             return $this->puntaje_eval_corte !== null ? (float) $this->puntaje_eval_corte null;
  104.         }
  105.     public function setPuntajeEvalCorte($puntaje_eval_corte): self
  106.         {
  107.             $this->puntaje_eval_corte $puntaje_eval_corte;
  108.             return $this;
  109.         }
  110.     public function getCuestionarios(): array
  111.     {
  112.         return $this->cuestionarios;
  113.     }
  114.     public function setCuestionarios(array $cuestionarios): self
  115.     {
  116.         $this->cuestionarios $cuestionarios;
  117.         return $this;
  118.     }
  119.     public function getDocumentos(): array
  120.     {
  121.         return $this->documentos;
  122.     }
  123.     public function setDocumentos(array $documentos): self
  124.     {
  125.         $this->documentos $documentos;
  126.         return $this;
  127.     }
  128.     public function getEstado(): ?string
  129.     {
  130.         return $this->estado;
  131.     }
  132.     public function setEstado(?string $estado): self
  133.     {
  134.         $this->estado $estado;
  135.         return $this;
  136.     }
  137.     public function getCriterios()
  138.     {
  139.         return $this->criteriosConvocatorias;
  140.     }
  141.     public function getPostulacion()
  142.     {
  143.         return $this->postulacion;
  144.     }
  145.     public function __toString(){
  146.         return $this->getNombre();
  147.     }
  148.     public function getApertura(): ?bool
  149.     {
  150.         return $this->apertura;
  151.     }
  152.     public function setApertura(?bool $apertura): self
  153.     {
  154.         $this->apertura $apertura;
  155.         return $this;
  156.     }
  157. }