vendor/croisiland/common-bundle/src/Entity/Offer/OfferCruise.php line 22

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Croisiland\CommonBundle\Entity\Offer;
  4. use Crea\ParameterBundle\Entity\Parameter;
  5. use Croisiland\CommonBundle\Entity\Cruise\Cruise;
  6. use Croisiland\CommonBundle\Repository\Offer\OfferCruiseRepository;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9. * @ORM\Entity(repositoryClass=OfferCruiseRepository::class)
  10. *
  11. * @ORM\Table(
  12. * uniqueConstraints={
  13. *
  14. * @ORM\UniqueConstraint(name="unique_constraint", columns={"offer_id", "cruise_id"})
  15. * }
  16. * )
  17. */
  18. class OfferCruise
  19. {
  20. /**
  21. * @ORM\Id
  22. *
  23. * @ORM\GeneratedValue
  24. *
  25. * @ORM\Column(type="integer")
  26. */
  27. private ?int $id;
  28. /**
  29. * @ORM\ManyToOne(targetEntity=Offer::class, inversedBy="offerCruises")
  30. *
  31. * @ORM\JoinColumn(nullable=false)
  32. */
  33. private ?Offer $offer = null;
  34. /**
  35. * @ORM\ManyToOne(targetEntity=Cruise::class, inversedBy="offerCruises")
  36. *
  37. * @ORM\JoinColumn(nullable=false)
  38. */
  39. private ?Cruise $cruise = null;
  40. /**
  41. * @ORM\ManyToOne(targetEntity=Parameter::class)
  42. *
  43. * @ORM\JoinColumn(nullable=false)
  44. */
  45. private Parameter $offerOrigin;
  46. public function getId(): ?int
  47. {
  48. return $this->id;
  49. }
  50. public function getOffer(): ?Offer
  51. {
  52. return $this->offer;
  53. }
  54. public function setOffer(?Offer $offer): self
  55. {
  56. $this->offer = $offer;
  57. return $this;
  58. }
  59. public function getCruise(): ?Cruise
  60. {
  61. return $this->cruise;
  62. }
  63. public function setCruise(?Cruise $cruise): self
  64. {
  65. $this->cruise = $cruise;
  66. return $this;
  67. }
  68. public function getOfferOrigin(): ?Parameter
  69. {
  70. return $this->offerOrigin;
  71. }
  72. public function setOfferOrigin(?Parameter $offerOrigin): self
  73. {
  74. $this->offerOrigin = $offerOrigin;
  75. return $this;
  76. }
  77. }