src/CoreBundle/Entity/PeerTheme.php line 13

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7. * @ORM\Table("peer_theme")
  8. * @ORM\Entity(repositoryClass="CoreBundle\Entity\PeerThemeRepository")
  9. */
  10. class PeerTheme
  11. {
  12. /**
  13. * @ORM\Column(type="integer")
  14. * @ORM\Id
  15. * @ORM\GeneratedValue(strategy="AUTO")
  16. */
  17. private int $id;
  18. /**
  19. * @ORM\Column(type="string", length=255, unique=true)
  20. */
  21. private string $name;
  22. /**
  23. * @ORM\Column(name="is_kombi", type="boolean", nullable=true)
  24. */
  25. private ?bool $isKombi;
  26. /**
  27. * @var Collection|ArrayCollection|PeerMathproblem[]
  28. *
  29. * @ORM\OneToMany(targetEntity="PeerMathproblem", mappedBy="peerTheme")
  30. */
  31. private Collection $peerMathproblems;
  32. /**
  33. * @var Collection|ArrayCollection|PeerSession[]
  34. *
  35. * @ORM\OneToMany(targetEntity="PeerSession", mappedBy="peerTheme")
  36. */
  37. private Collection $peerSessions;
  38. /**
  39. * @ORM\ManyToOne(targetEntity="PeerThemeClassType")
  40. * @ORM\JoinColumn(name="class_type", referencedColumnName="id", onDelete="CASCADE")
  41. */
  42. private PeerThemeClassType $peerThemeClassType;
  43. public function __construct()
  44. {
  45. $this->peerMathproblems = new ArrayCollection();
  46. $this->peerSessions = new ArrayCollection();
  47. }
  48. public function getId(): int
  49. {
  50. return $this->id;
  51. }
  52. public function getName(): string
  53. {
  54. return $this->name;
  55. }
  56. public function setName(string $name)
  57. {
  58. $this->name = $name;
  59. }
  60. public function getIsKombi(): ?bool
  61. {
  62. return $this->isKombi;
  63. }
  64. /**
  65. * @return Collection|ArrayCollection|PeerMathproblem[]
  66. */
  67. public function getPeerMathproblems(): Collection
  68. {
  69. return $this->peerMathproblems;
  70. }
  71. /**
  72. * @return Collection|ArrayCollection|PeerSession[]
  73. */
  74. public function getPeerSessions(): Collection
  75. {
  76. return $this->peerSessions;
  77. }
  78. public function getPeerThemeClassType(): PeerThemeClassType
  79. {
  80. return $this->peerThemeClassType;
  81. }
  82. public function setPeerThemeClassType(PeerThemeClassType $peerThemeClassType)
  83. {
  84. $this->peerThemeClassType = $peerThemeClassType;
  85. }
  86. }