src/AdminBundle/Entity/BookingBookingExtra.php line 9

Open in your IDE?
  1. <?php
  2. namespace AdminBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Table(name: 'booking_booking_extra')]
  5. #[ORM\Entity]
  6. class BookingBookingExtra
  7. {
  8. /**
  9. * @var integer
  10. */
  11. #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
  12. #[ORM\Id]
  13. #[ORM\GeneratedValue(strategy: 'IDENTITY')]
  14. protected $id;
  15. #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
  16. #[ORM\ManyToOne(targetEntity: \Booking::class, inversedBy: 'extras')]
  17. protected $booking;
  18. #[ORM\JoinColumn(name: 'booking_request_id', referencedColumnName: 'id', onDelete: 'SET NULL', nullable: true)]
  19. #[ORM\ManyToOne(targetEntity: \BookingRequest::class, inversedBy: 'extras')]
  20. protected $bookingRequest;
  21. #[ORM\JoinColumn(name: 'booking_extra_id', referencedColumnName: 'id')]
  22. #[ORM\ManyToOne(targetEntity: \BookingExtra::class, inversedBy: 'bookingBookingExtras')]
  23. protected $bookingExtra;
  24. /**
  25. * @var string
  26. */
  27. #[ORM\Column(name: 'value', type: 'float', nullable: true)]
  28. protected $value;
  29. public function __construct(BookingExtra $bookingExtra)
  30. {
  31. $this->bookingExtra = $bookingExtra;
  32. }
  33. /**
  34. * @return int
  35. */
  36. public function getId()
  37. {
  38. return $this->id;
  39. }
  40. /**
  41. * @param int $id
  42. */
  43. public function setId($id)
  44. {
  45. $this->id = $id;
  46. }
  47. /**
  48. * @return mixed
  49. */
  50. public function getBooking()
  51. {
  52. return $this->booking;
  53. }
  54. /**
  55. * @param mixed $booking
  56. */
  57. public function setBooking($booking)
  58. {
  59. $this->booking = $booking;
  60. }
  61. /**
  62. * @return mixed
  63. */
  64. public function getBookingExtra()
  65. {
  66. return $this->bookingExtra;
  67. }
  68. /**
  69. * @param mixed $bookingExtra
  70. */
  71. public function setBookingExtra($bookingExtra)
  72. {
  73. $this->bookingExtra = $bookingExtra;
  74. }
  75. /**
  76. * @return string
  77. */
  78. public function getValue()
  79. {
  80. return $this->value;
  81. }
  82. /**
  83. * @param string $value
  84. */
  85. public function setValue($value)
  86. {
  87. $this->value = $value;
  88. }
  89. /**
  90. * @return mixed
  91. */
  92. public function getBookingRequest()
  93. {
  94. return $this->booking;
  95. }
  96. /**
  97. * @param mixed $bookingRequest
  98. */
  99. public function setBookingRequest($bookingRequest)
  100. {
  101. $this->bookingRequest = $bookingRequest;
  102. }
  103. }