src/AdminBundle/Entity/DriverTimeShifts.php line 10

Open in your IDE?
  1. <?php
  2. namespace AdminBundle\Entity;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Table(name: 'driver_time_shifts')]
  6. #[ORM\Entity(repositoryClass: \AdminBundle\Repository\DriverTimeShiftsRepository::class)]
  7. class DriverTimeShifts
  8. {
  9. /**
  10. * @var integer
  11. */
  12. #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
  13. #[ORM\Id]
  14. #[ORM\GeneratedValue(strategy: 'IDENTITY')]
  15. protected $id;
  16. /**
  17. * @var Driver
  18. */
  19. #[ORM\JoinColumn(name: 'driver_id', referencedColumnName: 'id', nullable: false)]
  20. #[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\Driver::class, inversedBy: 'driverTimeShifts')]
  21. private $driver;
  22. /**
  23. * @var DateTime
  24. */
  25. #[ORM\Column(name: 'date', type: 'date')]
  26. protected $date;
  27. /**
  28. * @var DateTime
  29. */
  30. #[ORM\Column(name: 'day_time_shift_start', type: 'datetime')]
  31. protected $dayTimeShiftStart;
  32. /**
  33. * @var DateTime
  34. */
  35. #[ORM\Column(name: 'day_time_shift_end', type: 'datetime')]
  36. protected $dayTimeShiftEnd;
  37. /**
  38. * @var string
  39. */
  40. #[ORM\Column(name: 'location', type: 'string', length: 255, nullable: true)]
  41. protected $location;
  42. /**
  43. * @var DateTime
  44. */
  45. #[ORM\Column(name: 'night_time_shift_start', type: 'datetime')]
  46. protected $nightTimeShiftStart;
  47. /**
  48. * @var DateTime
  49. */
  50. #[ORM\Column(name: 'night_time_shift_end', type: 'datetime')]
  51. protected $nightTimeShiftEnd;
  52. /**
  53. * @return int
  54. */
  55. public function getId()
  56. {
  57. return $this->id;
  58. }
  59. /**
  60. * @return Driver
  61. */
  62. public function getDriver()
  63. {
  64. return $this->driver;
  65. }
  66. /**
  67. * @param Driver $driver
  68. *
  69. * @return DriverTimeShifts
  70. */
  71. public function setDriver(Driver $driver)
  72. {
  73. $this->driver = $driver;
  74. return $this;
  75. }
  76. /**
  77. * @return DateTime
  78. */
  79. public function getDate()
  80. {
  81. return $this->date;
  82. }
  83. /**
  84. * @param DateTime $date
  85. *
  86. * @return DriverTimeShifts
  87. */
  88. public function setDate(DateTime $date)
  89. {
  90. $this->date = $date;
  91. return $this;
  92. }
  93. /**
  94. * @return DateTime
  95. */
  96. public function getDayTimeShiftStart()
  97. {
  98. return $this->dayTimeShiftStart;
  99. }
  100. /**
  101. * @param DateTime $dayTimeShiftStart
  102. *
  103. * @return DriverTimeShifts
  104. */
  105. public function setDayTimeShiftStart(DateTime $dayTimeShiftStart)
  106. {
  107. $this->dayTimeShiftStart = $dayTimeShiftStart;
  108. return $this;
  109. }
  110. /**
  111. * @return DateTime
  112. */
  113. public function getDayTimeShiftEnd()
  114. {
  115. return $this->dayTimeShiftEnd;
  116. }
  117. /**
  118. * @param DateTime $dayTimeShiftEnd
  119. *
  120. * @return DriverTimeShifts
  121. */
  122. public function setDayTimeShiftEnd(DateTime $dayTimeShiftEnd)
  123. {
  124. $this->dayTimeShiftEnd = $dayTimeShiftEnd;
  125. return $this;
  126. }
  127. /**
  128. * @return string
  129. */
  130. public function getLocation()
  131. {
  132. return $this->location;
  133. }
  134. /**
  135. * @param string $location
  136. *
  137. * @return DriverTimeShifts
  138. */
  139. public function setLocation(string $location = null)
  140. {
  141. $this->location = $location;
  142. return $this;
  143. }
  144. /**
  145. * @return DateTime
  146. */
  147. public function getNightTimeShiftStart()
  148. {
  149. return $this->nightTimeShiftStart;
  150. }
  151. /**
  152. * @param DateTime $nightTimeShiftStart
  153. *
  154. * @return DriverTimeShifts
  155. */
  156. public function setNightTimeShiftStart(DateTime $nightTimeShiftStart)
  157. {
  158. $this->nightTimeShiftStart = $nightTimeShiftStart;
  159. return $this;
  160. }
  161. /**
  162. * @return DateTime
  163. */
  164. public function getNightTimeShiftEnd()
  165. {
  166. return $this->nightTimeShiftEnd;
  167. }
  168. /**
  169. * @param DateTime $nightTimeShiftEnd
  170. *
  171. * @return DriverTimeShifts
  172. */
  173. public function setNightTimeShiftEnd(DateTime $nightTimeShiftEnd)
  174. {
  175. $this->nightTimeShiftEnd = $nightTimeShiftEnd;
  176. return $this;
  177. }
  178. }