vendor/croisiland/common-bundle/src/Entity/Cruise/TagCruise.php line 18

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Croisiland\CommonBundle\Entity\Cruise;
  4. use Crea\ToolsBundle\Entity\LifecycleUserIdentifierTrait;
  5. use Croisiland\CommonBundle\Entity\Tag\Tag;
  6. use Croisiland\CommonBundle\Entity\Traits\ListOrderTrait;
  7. use Croisiland\CommonBundle\Repository\Cruise\TagCruiseRepository;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10. * Table de relation ManyToMany entre Tag et Cruise.
  11. *
  12. * @ORM\Entity(repositoryClass=TagCruiseRepository::class)
  13. */
  14. class TagCruise
  15. {
  16. use ListOrderTrait;
  17. use LifecycleUserIdentifierTrait;
  18. /**
  19. * @ORM\Id
  20. *
  21. * @ORM\GeneratedValue
  22. *
  23. * @ORM\Column(type="integer")
  24. */
  25. private ?int $id = null;
  26. /**
  27. * @ORM\ManyToOne(targetEntity=Tag::class, inversedBy="tagCruises")
  28. *
  29. * @ORM\JoinColumn(nullable=false)
  30. */
  31. private ?Tag $tag = null;
  32. /**
  33. * @ORM\ManyToOne(targetEntity=Cruise::class, inversedBy="tagCruises")
  34. *
  35. * @ORM\JoinColumn(nullable=false)
  36. */
  37. private ?Cruise $cruise = null;
  38. /**
  39. * @ORM\Column(type="integer")
  40. */
  41. private int $position = 1;
  42. public function getId(): ?int
  43. {
  44. return $this->id;
  45. }
  46. public function getTag(): ?Tag
  47. {
  48. return $this->tag;
  49. }
  50. public function setTag(?Tag $tag): self
  51. {
  52. $this->tag = $tag;
  53. return $this;
  54. }
  55. public function getCruise(): ?Cruise
  56. {
  57. return $this->cruise;
  58. }
  59. public function setCruise(?Cruise $cruise): self
  60. {
  61. $this->cruise = $cruise;
  62. return $this;
  63. }
  64. public function getPosition(): int
  65. {
  66. return $this->position;
  67. }
  68. public function setPosition(int $position): self
  69. {
  70. $this->position = $position;
  71. return $this;
  72. }
  73. }