src/Entity/SolicitudPublica.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SolicitudPublicaRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=SolicitudPublicaRepository::class)
  9.  */
  10. class SolicitudPublica
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     private $nombre;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $email;
  26.     /**
  27.      * @ORM\Column(type="date")
  28.      */
  29.     private $fechaEntrada;
  30.     /**
  31.      * @ORM\Column(type="date")
  32.      */
  33.     private $fechaSalida;
  34.     /**
  35.      * @ORM\Column(type="integer")
  36.      */
  37.     private $adultos;
  38.     /**
  39.      * @ORM\Column(type="integer")
  40.      */
  41.     private $menores;
  42.     /**
  43.      * @ORM\Column(type="boolean")
  44.      */
  45.     private $entiendo;
  46.     /**
  47.      * @ORM\Column(type="boolean")
  48.      */
  49.     private $autorizacion;
  50.     /**
  51.      * @ORM\Column(type="datetime_immutable")
  52.      */
  53.     private $autorizadoEn;
  54.     /**
  55.      * @ORM\ManyToOne(targetEntity=Provider::class, inversedBy="solicitudesPublicas")
  56.      */
  57.     private $proveedor;
  58.     /**
  59.      * @ORM\Column(type="string", length=255, nullable=true)
  60.      */
  61.     private $apellido;
  62.     /**
  63.      * @ORM\Column(type="string", length=255, nullable=true)
  64.      */
  65.     private $telefono;
  66.     /**
  67.      * @ORM\Column(type="string", length=255, nullable=true)
  68.      */
  69.     private $destino;
  70.     /**
  71.      * @ORM\Column(type="string", length=255, nullable=true)
  72.      */
  73.     private $cadena;
  74.     /**
  75.      * @ORM\OneToMany(targetEntity=SolicitudPublicaLog::class, mappedBy="solicitud")
  76.      */
  77.     private $solicitudPublicaLogs;
  78.     /**
  79.      * @ORM\Column(type="boolean")
  80.      */
  81.     private $completada false;
  82.     /**
  83.      * @ORM\Column(type="time", nullable=true)
  84.      */
  85.     private $horaDeContactoDesde;
  86.     /**
  87.      * @ORM\Column(type="time", nullable=true)
  88.      */
  89.     private $horaDeContactoHasta;
  90.     /**
  91.      * @ORM\Column(type="boolean")
  92.      */
  93.     private $esSocio 0;
  94.     /**
  95.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="solicitudPublicas")
  96.      */
  97.     private $socio;
  98.     public function __construct()
  99.     {
  100.         $this->solicitudPublicaLogs = new ArrayCollection();
  101.         $this->autorizadoEn = new \DateTimeImmutable();
  102.     }
  103.     /**
  104.      * @return mixed
  105.      */
  106.     public function getDestino()
  107.     {
  108.         return $this->destino;
  109.     }
  110.     /**
  111.      * @param mixed $destino
  112.      */
  113.     public function setDestino($destino): void
  114.     {
  115.         $this->destino $destino;
  116.     }
  117.     /**
  118.      * @return mixed
  119.      */
  120.     public function getCadena()
  121.     {
  122.         return $this->cadena;
  123.     }
  124.     /**
  125.      * @param mixed $cadena
  126.      */
  127.     public function setCadena($cadena): void
  128.     {
  129.         $this->cadena $cadena;
  130.     }
  131.     /**
  132.      * @return mixed
  133.      */
  134.     public function getHoraDeContactoDesde()
  135.     {
  136.         return $this->horaDeContactoDesde;
  137.     }
  138.     /**
  139.      * @param mixed $horaDeContactoDesde
  140.      */
  141.     public function setHoraDeContactoDesde($horaDeContactoDesde): void
  142.     {
  143.         $this->horaDeContactoDesde $horaDeContactoDesde;
  144.     }
  145.     /**
  146.      * @return mixed
  147.      */
  148.     public function getHoraDeContactoHasta()
  149.     {
  150.         return $this->horaDeContactoHasta;
  151.     }
  152.     /**
  153.      * @param mixed $horaDeContactoHasta
  154.      */
  155.     public function setHoraDeContactoHasta($horaDeContactoHasta): void
  156.     {
  157.         $this->horaDeContactoHasta $horaDeContactoHasta;
  158.     }
  159.     public function getId(): ?int
  160.     {
  161.         return $this->id;
  162.     }
  163.     public function getNombre(): ?string
  164.     {
  165.         return $this->nombre;
  166.     }
  167.     public function setNombre(string $nombre): self
  168.     {
  169.         $this->nombre $nombre;
  170.         return $this;
  171.     }
  172.     public function getEmail(): ?string
  173.     {
  174.         return $this->email;
  175.     }
  176.     public function setEmail(string $email): self
  177.     {
  178.         $this->email $email;
  179.         return $this;
  180.     }
  181.     public function getFechaEntrada(): ?\DateTimeInterface
  182.     {
  183.         return $this->fechaEntrada;
  184.     }
  185.     public function setFechaEntrada(\DateTimeInterface $fechaEntrada): self
  186.     {
  187.         $this->fechaEntrada $fechaEntrada;
  188.         return $this;
  189.     }
  190.     public function getFechaSalida(): ?\DateTimeInterface
  191.     {
  192.         return $this->fechaSalida;
  193.     }
  194.     public function setFechaSalida(\DateTimeInterface $fechaSalida): self
  195.     {
  196.         $this->fechaSalida $fechaSalida;
  197.         return $this;
  198.     }
  199.     public function getAdultos(): ?int
  200.     {
  201.         return $this->adultos;
  202.     }
  203.     public function setAdultos(int $adultos): self
  204.     {
  205.         $this->adultos $adultos;
  206.         return $this;
  207.     }
  208.     public function getMenores(): ?int
  209.     {
  210.         return $this->menores;
  211.     }
  212.     public function setMenores(int $menores): self
  213.     {
  214.         $this->menores $menores;
  215.         return $this;
  216.     }
  217.     public function isEntiendo(): ?bool
  218.     {
  219.         return $this->entiendo;
  220.     }
  221.     public function setEntiendo(bool $entiendo): self
  222.     {
  223.         $this->entiendo $entiendo;
  224.         return $this;
  225.     }
  226.     public function isAutorizacion(): ?bool
  227.     {
  228.         return $this->autorizacion;
  229.     }
  230.     public function setAutorizacion(bool $autorizacion): self
  231.     {
  232.         $this->autorizacion $autorizacion;
  233.         return $this;
  234.     }
  235.     public function getAutorizadoEn(): ?\DateTimeImmutable
  236.     {
  237.         return $this->autorizadoEn;
  238.     }
  239.     public function setAutorizadoEn(\DateTimeImmutable $autorizadoEn): self
  240.     {
  241.         $this->autorizadoEn $autorizadoEn;
  242.         return $this;
  243.     }
  244.     public function getProveedor(): ?Provider
  245.     {
  246.         return $this->proveedor;
  247.     }
  248.     public function setProveedor(?Provider $proveedor): self
  249.     {
  250.         $this->proveedor $proveedor;
  251.         return $this;
  252.     }
  253.     public function getApellido(): ?string
  254.     {
  255.         return $this->apellido;
  256.     }
  257.     public function setApellido(string $apellido): self
  258.     {
  259.         $this->apellido $apellido;
  260.         return $this;
  261.     }
  262.     public function getTelefono(): ?string
  263.     {
  264.         return $this->telefono;
  265.     }
  266.     public function setTelefono(string $telefono): self
  267.     {
  268.         $this->telefono $telefono;
  269.         return $this;
  270.     }
  271.     /**
  272.      * @return Collection<int, SolicitudPublicaLog>
  273.      */
  274.     public function getSolicitudPublicaLogs(): Collection
  275.     {
  276.         return $this->solicitudPublicaLogs;
  277.     }
  278.     public function addSolicitudPublicaLog(SolicitudPublicaLog $solicitudPublicaLog): self
  279.     {
  280.         if (!$this->solicitudPublicaLogs->contains($solicitudPublicaLog)) {
  281.             $this->solicitudPublicaLogs[] = $solicitudPublicaLog;
  282.             $solicitudPublicaLog->setSolicitud($this);
  283.         }
  284.         return $this;
  285.     }
  286.     public function removeSolicitudPublicaLog(SolicitudPublicaLog $solicitudPublicaLog): self
  287.     {
  288.         if ($this->solicitudPublicaLogs->removeElement($solicitudPublicaLog)) {
  289.             // set the owning side to null (unless already changed)
  290.             if ($solicitudPublicaLog->getSolicitud() === $this) {
  291.                 $solicitudPublicaLog->setSolicitud(null);
  292.             }
  293.         }
  294.         return $this;
  295.     }
  296.     public function isCompletada(): ?bool
  297.     {
  298.         return $this->completada;
  299.     }
  300.     public function setCompletada(bool $completada): self
  301.     {
  302.         $this->completada $completada;
  303.         return $this;
  304.     }
  305.     public function getNombreCompleto(): string
  306.     {
  307.         return $this->nombre ' ' $this->apellido;
  308.     }
  309.     public function isEsSocio(): ?bool
  310.     {
  311.         return $this->esSocio;
  312.     }
  313.     public function setEsSocio(bool $esSocio): self
  314.     {
  315.         $this->esSocio $esSocio;
  316.         return $this;
  317.     }
  318.     public function getSocio(): ?User
  319.     {
  320.         return $this->socio;
  321.     }
  322.     public function setSocio(?User $socio): self
  323.     {
  324.         $this->socio $socio;
  325.         return $this;
  326.     }
  327. }