src/Entity/Game/WordSearch/WordSearchParticipation.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Game\WordSearch;
  3. use App\Entity\BaseEntity;
  4. use App\Repository\Game\WordSearch\WordSearchParticipationRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use JMS\Serializer\Annotation as Serializer;
  9. /**
  10. * @ORM\Entity(repositoryClass=WordSearchParticipationRepository::class)
  11. * @Serializer\ExclusionPolicy("ALL")
  12. */
  13. class WordSearchParticipation extends BaseEntity
  14. {
  15. /**
  16. * @ORM\Id
  17. * @ORM\GeneratedValue
  18. * @ORM\Column(type="integer")
  19. * @Serializer\Expose
  20. */
  21. private $id;
  22. /**
  23. * @ORM\ManyToOne(targetEntity=Grid::class, inversedBy="wordSearchParticipations")
  24. */
  25. private $grid;
  26. /**
  27. * @ORM\Column(type="json", nullable=true)
  28. * @Serializer\Expose
  29. */
  30. private $wordList = [];
  31. /**
  32. * @ORM\Column(type="json", nullable=true)
  33. * @Serializer\Expose
  34. */
  35. private $wordFound = [];
  36. /**
  37. * @ORM\ManyToOne(targetEntity=WordSearchLevel::class, inversedBy="participations")
  38. */
  39. private $level;
  40. /**
  41. * @ORM\Column(type="integer")
  42. */
  43. private $score = 0;
  44. public function __construct()
  45. {
  46. }
  47. public function getId(): ?int
  48. {
  49. return $this->id;
  50. }
  51. public function getGrid(): ?Grid
  52. {
  53. return $this->grid;
  54. }
  55. public function setGrid(?Grid $grid): self
  56. {
  57. $this->grid = $grid;
  58. return $this;
  59. }
  60. public function getWordList(): ?array
  61. {
  62. return $this->wordList;
  63. }
  64. public function setWordList(?array $wordList): self
  65. {
  66. $this->wordList = $wordList;
  67. return $this;
  68. }
  69. public function getWordFound(): ?array
  70. {
  71. return $this->wordFound;
  72. }
  73. public function setWordFound(?array $wordFound): self
  74. {
  75. $this->wordFound = $wordFound;
  76. return $this;
  77. }
  78. public function getLevel(): ?WordSearchLevel
  79. {
  80. return $this->level;
  81. }
  82. public function setLevel(?WordSearchLevel $level): self
  83. {
  84. $this->level = $level;
  85. return $this;
  86. }
  87. public function getScore(): ?int
  88. {
  89. return $this->score;
  90. }
  91. public function setScore(int $score): self
  92. {
  93. $this->score = $score;
  94. return $this;
  95. }
  96. }