src/Entity/Core/Peer/PeerTheme.php line 11

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