<?phpnamespace App\Entity\Core\Peer;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Table('peer_group')]#[ORM\Entity]class PeerGroup{ /** * @var int */ #[ORM\Column(name: 'id', type: 'integer')] #[ORM\Id] #[ORM\GeneratedValue(strategy: 'AUTO')] private $id; #[ORM\Column(type: 'integer', nullable: true)] private $currentStage = 45; /** * @var PeerSession */ #[ORM\JoinColumn(name: 'peer_session', referencedColumnName: 'id', onDelete: 'CASCADE')] #[ORM\ManyToOne(targetEntity: PeerSession::class, inversedBy: 'peerGroups')] private $peerSession; #[ORM\JoinColumn(name: 'peer_problem_id', nullable: true)] #[ORM\ManyToOne(targetEntity: PeerMathproblem::class)] private ?PeerMathproblem $peerProblem; #[ORM\OneToMany(targetEntity: PeerUnit::class, mappedBy: 'peerGroup', cascade: ['persist', 'remove'])] private Collection $peerUnits; /** * PeerGroup constructor. */ public function __construct() { $this->peerUnits = new ArrayCollection(); } public function getId(): int { return $this->id; } /** * @return mixed */ public function getCurrentStage() { return $this->currentStage; } /** * @param mixed $currentStage */ public function setCurrentStage($currentStage) { $this->currentStage = $currentStage; } public function getPeerSession(): PeerSession { return $this->peerSession; } public function setPeerSession(PeerSession $peerSession) { $this->peerSession = $peerSession; } /** * @return ArrayCollection | PeerUnit[] */ public function getPeerUnits(): Collection { return $this->peerUnits; } public function addPeerUnit(PeerUnit $peerUnit) { $peerUnit->setPeerGroup($this); $this->peerUnits->add($peerUnit); } public function getPeerProblem(): ?PeerMathproblem { return $this->peerProblem; } public function setPeerProblem(PeerMathproblem $peerProblem): void { $this->peerProblem = $peerProblem; }}