src/Entity/Channel/PositioningTest/PositioningTestBlock.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Channel\PositioningTest;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. #[
  6. ORM\Entity,
  7. ORM\Table(name: 'channel_positioning_test_positioning_test_blocks'),
  8. ]
  9. class PositioningTestBlock
  10. {
  11. #[ORM\Id]
  12. #[ORM\GeneratedValue]
  13. #[ORM\Column(type: 'integer')]
  14. private ?int $id = null;
  15. #[ORM\Column(type: 'integer')]
  16. private ?int $rank = null;
  17. #[ORM\ManyToOne(targetEntity: PositioningTest::class, inversedBy: 'positioningTestBlocks')]
  18. #[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
  19. private ?PositioningTest $positioningTest = null;
  20. #[ORM\ManyToOne(targetEntity: Block::class, inversedBy: 'positioningTestBlocks')]
  21. #[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
  22. #[Assert\NotNull]
  23. private ?Block $block = null;
  24. public function getId(): ?int
  25. {
  26. return $this->id;
  27. }
  28. public function getRank(): ?int
  29. {
  30. return $this->rank;
  31. }
  32. public function setRank(?int $rank): static
  33. {
  34. $this->rank = $rank;
  35. return $this;
  36. }
  37. public function getPositioningTest(): ?PositioningTest
  38. {
  39. return $this->positioningTest;
  40. }
  41. public function setPositioningTest(?PositioningTest $positioningTest): static
  42. {
  43. $this->positioningTest = $positioningTest;
  44. return $this;
  45. }
  46. public function getBlock(): ?Block
  47. {
  48. return $this->block;
  49. }
  50. public function setBlock(?Block $block): static
  51. {
  52. $this->block = $block;
  53. return $this;
  54. }
  55. }