<?php declare(strict_types=1);
namespace CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\UniqueConstraint;
use UserBundle\Entity\User;
/**
* @ORM\Table("shared_quiz_extra_teacher",uniqueConstraints={@UniqueConstraint(name="unique_session_teacher", columns={"quiz_session", "teacher"})})
* @ORM\Entity
* @ORM\Entity(repositoryClass="CoreBundle\Entity\SharedQuizExtraTeacherRepository")
*/
class SharedQuizExtraTeacher
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private int $id;
/**
* @var User
*
* @ORM\ManyToOne(targetEntity="UserBundle\Entity\User")
* @ORM\JoinColumn(name="teacher", referencedColumnName="id")
*/
private User $teacher;
/**
* @var QuizSession
*
* @ORM\ManyToOne(targetEntity="CoreBundle\Entity\QuizSession")
* @ORM\JoinColumn(name="quiz_session", referencedColumnName="id")
*/
private QuizSession $quizSession;
/**
* This is the same as QuizSession->isPinned, but for this particular extra teacher, since it would be strange for
* different teachers to share the same pinned/unpinned state.
*
* @ORM\Column(name="is_pinned", type="boolean", options={"default" : false})
*/
private bool $isPinned = false;
public function getId(): int
{
return $this->id;
}
public function setId(int $id): void
{
$this->id = $id;
}
/**
* @return User
*/
public function getTeacher(): User
{
return $this->teacher;
}
/**
* @param User $teacher
* @return void
*/
public function setTeacher(User $teacher): void
{
$this->teacher = $teacher;
}
/**
* @return QuizSession
*/
public function getQuizSession(): QuizSession
{
return $this->quizSession;
}
/**
* @param QuizSession $quizSession
* @return void
*/
public function setQuizSession(QuizSession $quizSession): void
{
$this->quizSession = $quizSession;
}
public function isPinned(): bool
{
return $this->isPinned;
}
public function setIsPinned(bool $isPinned): void
{
$this->isPinned = $isPinned;
}
}