src/Entity/ProcesoRegistroReservistas.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Crud\Entity\crudEntity;
  5. use Symfony\Bridge\Doctrine\Form\Type\EntityType;
  6. //use TrazasBundle\Interfaces\trazaInterface;
  7. /**
  8.  * ProcesoReclutamiento
  9.  *
  10.  * @ORM\Table(name="proceso_registro_reservistas")
  11.  * @ORM\Entity(repositoryClass="App\Crud\Repository\crudRepository")
  12.  */
  13. class ProcesoRegistroReservistas extends crudEntity //implements trazaInterface 
  14. {
  15.     /**
  16.      * @var integer
  17.      *
  18.      * @ORM\Column(name="id", type="integer", nullable=false)
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="SEQUENCE")
  21.      * @ORM\SequenceGenerator(sequenceName="proceso_registro_reservistas_id_seq", allocationSize=1, initialValue=1)
  22.      */
  23.     private $id;
  24.     /**
  25.      * @var \DateTime
  26.      *
  27.      * @ORM\Column(name="fecha_inicio_registro", type="datetime", nullable=false, columnDefinition="fecha")
  28.      */
  29.     private $fechaInicioRegistro;
  30.     /**
  31.      * @var \DateTime
  32.      *
  33.      * @ORM\Column(name="fecha_fin_registro", type="datetime", nullable=false, columnDefinition="fecha")
  34.      */
  35.     private $fechaFinRegistro;
  36.     /**
  37.      * @var integer
  38.      *
  39.      * @ORM\Column(name="anno_desde", type="integer", nullable=false)
  40.      */
  41.     private $annoDesde;
  42.     
  43.     /**
  44.      * @var integer
  45.      *
  46.      * @ORM\Column(name="anno_hasta", type="integer", nullable=false)
  47.      */
  48.     private $annoHasta;
  49.     
  50.     /**
  51.      * @var boolean
  52.      *
  53.      * @ORM\Column(name="activo", type="boolean", nullable=true)
  54.      */
  55.     private $activo;
  56.     /**
  57.      * Get id
  58.      *
  59.      * @return integer
  60.      */
  61.     public function getId()
  62.     {
  63.         return $this->id;
  64.     }
  65.     public function __toString() {
  66.         return $this->getAnnoDesde().' - '.$this->getAnnoHasta();
  67.     }
  68.     
  69.     /*
  70.      * return \DateTime
  71.      */
  72.     public function getFechaInicioRegistro() {
  73.         return $this->fechaInicioRegistro;
  74.     }
  75.     /*
  76.      * return \DateTime
  77.      */
  78.     public function getFechaFinRegistro() {
  79.         return $this->fechaFinRegistro;
  80.     }
  81.     
  82.     public function setFechaInicioRegistro(\DateTime $fechaInicioRegistro)
  83.     {
  84.         $fechaInicioRegistro$fechaInicioRegistro->setTime(000);
  85.         if ($this->fechaFinRegistro && $this->fechaFinRegistro $fechaInicioRegistro)
  86.         {
  87.             $this->fechaInicioRegistro $this->fechaFinRegistro;
  88.             $this->fechaFinRegistro $fechaInicioRegistro;
  89.             
  90.         }
  91.         else 
  92.         {
  93.             $this->fechaInicioRegistro $fechaInicioRegistro;
  94.         }
  95.     }
  96.     public function setFechaFinRegistro(\DateTime $fechaFinRegistro
  97.     {
  98.         $fechaFinRegistro$fechaFinRegistro->setTime(235959);
  99.         if ($this->fechaInicioRegistro && $this->fechaInicioRegistro $fechaFinRegistro)
  100.         {
  101.             $this->fechaFinRegistro $this->fechaInicioRegistro;
  102.             $this->fechaInicioRegistro $fechaFinRegistro;
  103.         }
  104.         else
  105.         { 
  106.             $this->fechaFinRegistro $fechaFinRegistro;
  107.         }
  108.     }
  109.     public function getActivo() {
  110.         return $this->activo;
  111.     }
  112.     public function setActivo($activo) {
  113.         $this->activo $activo;
  114.     }
  115.     public static function getEntidadName()
  116.     {
  117.         return 'Proceso de registro';
  118.     }                      
  119.     public function getAnnoDesde(): int {
  120.         return $this->annoDesde;
  121.     }
  122.     public function getAnnoHasta(): int {
  123.         return $this->annoHasta;
  124.     }
  125.     public function setAnnoDesde(int $annoDesde): void {
  126.         $this->annoDesde $annoDesde;
  127.     }
  128.     public function setAnnoHasta(int $annoHasta): void {
  129.         $this->annoHasta $annoHasta;
  130.     }
  131. }