<?php
namespace AdminBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* NotificationBookingUpdate
*/
#[ORM\Table(name: 'notification_booking_update')]
#[ORM\Index(name: 'notification_index', columns: ['booking_id', 'driver_id'])]
#[ORM\Entity(repositoryClass: \AdminBundle\Repository\NotificationBookingUpdateRepository::class)]
class NotificationBookingUpdate
{
/**
* @var int
*/
#[ORM\Column(name: 'id', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
/**
* @var bool
*/
#[ORM\Column(name: 'seen', type: 'boolean', nullable: false)]
private $seen = false;
/**
* @var Booking
*/
#[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
#[ORM\ManyToOne(targetEntity: \Booking::class, inversedBy: 'notificationBooking', cascade: ['all'])]
private $booking;
/**
* @var Driver
*/
#[ORM\JoinColumn(name: 'driver_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
#[ORM\ManyToOne(targetEntity: \Driver::class, inversedBy: 'notificationBookingUpdates', cascade: ['all'])]
private $driver;
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set seen
*
* @param boolean $seen
*
* @return NotificationBookingUpdate
*/
public function setSeen($seen)
{
$this->seen = $seen;
return $this;
}
/**
* Get seen
*
* @return bool
*/
public function getSeen()
{
return $this->seen;
}
/**
* @return Booking
*/
public function getBooking(): Booking
{
return $this->booking;
}
/**
* @param Booking $booking
* @return NotificationBookingUpdate
*/
public function setBooking(Booking $booking): NotificationBookingUpdate
{
$this->booking = $booking;
return $this;
}
/**
* @return Driver
*/
public function getDriver(): Driver
{
return $this->driver;
}
/**
* @param Driver $driver
* @return NotificationBookingUpdate
*/
public function setDriver(Driver $driver): NotificationBookingUpdate
{
$this->driver = $driver;
return $this;
}
}