<?php
namespace App\Entity\Core\Peer;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table('peer_theme')]
#[ORM\Entity(repositoryClass: PeerThemeRepository::class)]
class PeerTheme
{
#[ORM\Column(type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private int $id;
#[ORM\Column(type: 'string', length: 255, unique: true)]
private string $name;
#[ORM\Column(name: 'is_kombi', type: 'boolean', nullable: true)]
private ?bool $isKombi;
/**
* @var Collection|ArrayCollection|PeerMathproblem[]
*/
#[ORM\OneToMany(targetEntity: PeerMathproblem::class, mappedBy: 'peerTheme')]
private Collection $peerMathproblems;
/**
* @var Collection|ArrayCollection|PeerSession[]
*/
#[ORM\OneToMany(targetEntity: PeerSession::class, mappedBy: 'peerTheme')]
private Collection $peerSessions;
#[ORM\JoinColumn(name: 'class_type', referencedColumnName: 'id', onDelete: 'CASCADE')]
#[ORM\ManyToOne(targetEntity: PeerThemeClassType::class)]
private PeerThemeClassType $peerThemeClassType;
public function __construct()
{
$this->peerMathproblems = new ArrayCollection();
$this->peerSessions = new ArrayCollection();
}
public function getId(): int
{
return $this->id;
}
public function getName(): string
{
return $this->name;
}
public function setName(string $name)
{
$this->name = $name;
}
public function getIsKombi(): ?bool
{
return $this->isKombi;
}
/**
* @return Collection|ArrayCollection|PeerMathproblem[]
*/
public function getPeerMathproblems(): Collection
{
return $this->peerMathproblems;
}
/**
* @return Collection|ArrayCollection|PeerSession[]
*/
public function getPeerSessions(): Collection
{
return $this->peerSessions;
}
public function getPeerThemeClassType(): PeerThemeClassType
{
return $this->peerThemeClassType;
}
public function setPeerThemeClassType(PeerThemeClassType $peerThemeClassType)
{
$this->peerThemeClassType = $peerThemeClassType;
}
}