<?phpnamespace CoreBundle\Entity;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\ManyToOne(targetEntity="CoreBundle\Entity\PeerSession", inversedBy="peerGroups") * @ORM\JoinColumn(name="peer_session", referencedColumnName="id", onDelete="CASCADE") */ private $peerSession; /** * @ORM\ManyToOne(targetEntity="PeerMathproblem") * @ORM\JoinColumn(name="peer_problem_id", nullable=true) */ private ?PeerMathproblem $peerProblem; /** * @ORM\OneToMany(targetEntity="PeerUnit", mappedBy="peerGroup", cascade={"persist", "remove"}) */ private Collection $peerUnits; /** * PeerGroup constructor. */ public function __construct() { $this->peerUnits = new ArrayCollection(); } /** * @return int */ 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; } /** * @return PeerSession */ public function getPeerSession(): PeerSession { return $this->peerSession; } /** * @param PeerSession $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; }}