src/AdminBundle/Entity/NotificationBookingUpdate.php line 13

Open in your IDE?
  1. <?php
  2. namespace AdminBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * NotificationBookingUpdate
  6. */
  7. #[ORM\Table(name: 'notification_booking_update')]
  8. #[ORM\Index(name: 'notification_index', columns: ['booking_id', 'driver_id'])]
  9. #[ORM\Entity(repositoryClass: \AdminBundle\Repository\NotificationBookingUpdateRepository::class)]
  10. class NotificationBookingUpdate
  11. {
  12. /**
  13. * @var int
  14. */
  15. #[ORM\Column(name: 'id', type: 'integer')]
  16. #[ORM\Id]
  17. #[ORM\GeneratedValue(strategy: 'AUTO')]
  18. private $id;
  19. /**
  20. * @var bool
  21. */
  22. #[ORM\Column(name: 'seen', type: 'boolean', nullable: false)]
  23. private $seen = false;
  24. /**
  25. * @var Booking
  26. */
  27. #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
  28. #[ORM\ManyToOne(targetEntity: \Booking::class, inversedBy: 'notificationBooking', cascade: ['all'])]
  29. private $booking;
  30. /**
  31. * @var Driver
  32. */
  33. #[ORM\JoinColumn(name: 'driver_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
  34. #[ORM\ManyToOne(targetEntity: \Driver::class, inversedBy: 'notificationBookingUpdates', cascade: ['all'])]
  35. private $driver;
  36. /**
  37. * Get id
  38. *
  39. * @return int
  40. */
  41. public function getId()
  42. {
  43. return $this->id;
  44. }
  45. /**
  46. * Set seen
  47. *
  48. * @param boolean $seen
  49. *
  50. * @return NotificationBookingUpdate
  51. */
  52. public function setSeen($seen)
  53. {
  54. $this->seen = $seen;
  55. return $this;
  56. }
  57. /**
  58. * Get seen
  59. *
  60. * @return bool
  61. */
  62. public function getSeen()
  63. {
  64. return $this->seen;
  65. }
  66. /**
  67. * @return Booking
  68. */
  69. public function getBooking(): Booking
  70. {
  71. return $this->booking;
  72. }
  73. /**
  74. * @param Booking $booking
  75. * @return NotificationBookingUpdate
  76. */
  77. public function setBooking(Booking $booking): NotificationBookingUpdate
  78. {
  79. $this->booking = $booking;
  80. return $this;
  81. }
  82. /**
  83. * @return Driver
  84. */
  85. public function getDriver(): Driver
  86. {
  87. return $this->driver;
  88. }
  89. /**
  90. * @param Driver $driver
  91. * @return NotificationBookingUpdate
  92. */
  93. public function setDriver(Driver $driver): NotificationBookingUpdate
  94. {
  95. $this->driver = $driver;
  96. return $this;
  97. }
  98. }