src/Entity/HorarioReducido.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /** @ORM\Table(name="oficina_dayoff_horario")
  5.  * @ORM\Entity(repositoryClass="App\Repository\HorarioReducidoRepository")
  6.  */
  7. class HorarioReducido
  8. {
  9.     /**
  10.      * @var integer
  11.      *
  12.      * @ORM\Column(name="id", type="integer")
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue(strategy="AUTO")
  15.      */
  16.     private $id;
  17.     
  18.     /**
  19.      * @var \DateTime
  20.      *
  21.      * @ORM\Column(name="horaInicio", type="time", nullable=true)
  22.      */
  23.     private $horaInicio;
  24.     /**
  25.      * @var \DateTime
  26.      *
  27.      * @ORM\Column(name="horaFin", type="time", nullable=true)
  28.      */
  29.     private $horaFin;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity="DayOff")
  32.      * @ORM\JoinColumn(name="dayoff_id", referencedColumnName="id", nullable=false)
  33.      */
  34.     protected $dayoff;
  35.     
  36.     /**
  37.      * @var boolean
  38.      *
  39.      * @ORM\Column(name="festivo", type="boolean")
  40.      */
  41. //     private $festivo=0;
  42.     public function __toString()
  43.     {
  44.         return $this->getDayoff()->getDate()->format('Y-m-d');
  45.     }
  46.     
  47.     /**
  48.      * Get id
  49.      *
  50.      * @return integer 
  51.      */
  52.     public function getId()
  53.     {
  54.         return $this->id;
  55.     }
  56.     /**
  57.      * Set horaInicio
  58.      *
  59.      * @param \DateTime $horaInicio
  60.      * @return HorarioReducido
  61.      */
  62.     public function setHoraInicio($horaInicio)
  63.     {
  64.         $this->horaInicio $horaInicio;
  65.         return $this;
  66.     }
  67.     /**
  68.      * Get horaInicio
  69.      *
  70.      * @return \DateTime
  71.      */
  72.     public function getHoraInicio()
  73.     {
  74.         return $this->horaInicio;
  75.     }
  76.     /**
  77.      * Set horaFin
  78.      *
  79.      * @param \DateTime $horaFin
  80.      * @return HorarioReducido
  81.      */
  82.     public function setHoraFin($horaFin)
  83.     {
  84.         $this->horaFin $horaFin;
  85.         return $this;
  86.     }
  87.     /**
  88.      * Get horaFin
  89.      *
  90.      * @return \DateTime
  91.      */
  92.     public function getHoraFin()
  93.     {
  94.         return $this->horaFin;
  95.     }
  96.     /**
  97.      * @return mixed
  98.      */
  99.     public function getDayoff()
  100.     {
  101.         return $this->dayoff;
  102.     }
  103.     /**
  104.      * @param mixed $dayoff
  105.      */
  106.     public function setDayoff($dayoff)
  107.     {
  108.         $this->dayoff $dayoff;
  109.     }
  110.     
  111.     
  112.     /**
  113.      * Set festivo
  114.      *
  115.      * @param bool $festivo
  116.      * @return bool
  117.      */
  118.     public function setFestivo($festivo)
  119.     {
  120.         $this->festivo $festivo;
  121.         return $this;
  122.     }
  123.     /**
  124.     * Get festivo
  125.     *
  126.     * @return bool
  127.     */
  128.     public function getFestivo()
  129.     {
  130.         return $this->festivo;
  131.     }
  132. }