<?php
namespace App\Entity;
use App\Repository\ModuleParticipationRepository;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as Serializer;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass=ModuleParticipationRepository::class)
* @Serializer\ExclusionPolicy("ALL")
* @ORM\AssociationOverrides({
* @ORM\AssociationOverride(
* name="createdBy",
* inversedBy="moduleParticipations",
* joinColumns={@ORM\JoinColumn(name="created_by", referencedColumnName="id", nullable=true, onDelete="CASCADE")}
* )
* })
*/
class ModuleParticipation extends BaseEntity
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Module::class, inversedBy="moduleParticipations")
* @Serializer\Expose
* @Serializer\Groups({"participation"})
*/
private $module;
/**
* @ORM\ManyToOne(targetEntity=Course::class, inversedBy="moduleParticipations")
* @Serializer\Expose
* @Serializer\Groups({"course_participation"})
*/
private $course;
/**
* @ORM\ManyToOne(targetEntity=Quiz::class, inversedBy="moduleParticipations")
* @Serializer\Expose
* @Serializer\Groups({"quiz_participation"})
*/
private $quiz;
/**
* @ORM\ManyToOne(targetEntity=Live::class, inversedBy="moduleParticipations")
* @Serializer\Expose
* @Serializer\Groups({"live_participation"})
*/
private $live;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
* @Serializer\Expose
* @Serializer\Groups({"quiz_participation"})
*/
private $quizScore;
/**
* @ORM\ManyToOne(targetEntity=Program::class, inversedBy="moduleParticipations")
* @Serializer\Expose
* @Serializer\Groups({"participation"})
*/
private $program;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $automaticEndAt;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isNotePublished = true;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Serializer\Expose
* @Serializer\Groups({"course_participation", "quiz_participation"})
*/
private $quizCertificate;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Serializer\Expose
* @Serializer\Groups({"course_participation", "quiz_participation"})
*/
private $quizBadge;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Serializer\Expose
* @Serializer\Groups({"course_participation", "quiz_participation"})
*/
private $quizCertificateLabel;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private $customAnswerNote;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private $fileAnswerNote;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
* @Serializer\Expose
* @Serializer\Groups({"course_participation", "quiz_participation"})
*/
private $quizTotalNote;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $startAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $endAt;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Serializer\Expose
* @Serializer\Groups({"course_participation", "quiz_participation"})
*/
private $quizBadgeLabel;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $customAnswerCount;
/**
* @ORM\Column(type="json", nullable=true)
*/
private $quizQuestionIds = [];
public function getId(): ?int
{
return $this->id;
}
public function getModule(): ?Module
{
return $this->module;
}
public function setModule(?Module $module): self
{
$this->module = $module;
return $this;
}
public function getCourse(): ?Course
{
return $this->course;
}
public function setCourse(?Course $course): self
{
$this->course = $course;
return $this;
}
public function getQuiz(): ?Quiz
{
return $this->quiz;
}
public function setQuiz(?Quiz $quiz): self
{
$this->quiz = $quiz;
return $this;
}
public function getLive(): ?Live
{
return $this->live;
}
public function setLive(?Live $live): self
{
$this->live = $live;
return $this;
}
public function getQuizScore(): ?string
{
return $this->quizScore;
}
public function setQuizScore(?string $quizScore): self
{
$this->quizScore = $quizScore;
return $this;
}
public function getProgram(): ?Program
{
return $this->program;
}
public function setProgram(?Program $program): self
{
$this->program = $program;
return $this;
}
public function getAutomaticEndAt(): ?\DateTimeInterface
{
return $this->automaticEndAt;
}
public function setAutomaticEndAt(?\DateTimeInterface $automaticEndAt): self
{
$this->automaticEndAt = $automaticEndAt;
return $this;
}
public function isIsNotePublished(): ?bool
{
return $this->isNotePublished;
}
public function setIsNotePublished(?bool $isNotePublished): self
{
$this->isNotePublished = $isNotePublished;
return $this;
}
public function getQuizCertificate(): ?string
{
return $this->quizCertificate;
}
public function setQuizCertificate(?string $quizCertificate): self
{
$this->quizCertificate = $quizCertificate;
return $this;
}
public function getQuizBadge(): ?string
{
return $this->quizBadge;
}
public function setQuizBadge(?string $quizBadge): self
{
$this->quizBadge = $quizBadge;
return $this;
}
public function getQuizCertificateLabel(): ?string
{
return $this->quizCertificateLabel;
}
public function setQuizCertificateLabel(?string $quizCertificateLabel): self
{
$this->quizCertificateLabel = $quizCertificateLabel;
return $this;
}
public function getCustomAnswerNote(): ?string
{
return $this->customAnswerNote;
}
public function setCustomAnswerNote(?string $customAnswerNote): self
{
$this->customAnswerNote = $customAnswerNote;
return $this;
}
public function getFileAnswerNote(): ?string
{
return $this->fileAnswerNote;
}
public function setFileAnswerNote(?string $fileAnswerNote): self
{
$this->fileAnswerNote = $fileAnswerNote;
return $this;
}
public function getQuizTotalNote(): ?string
{
return $this->quizTotalNote;
}
public function setQuizTotalNote(?string $quizTotalNote): self
{
$this->quizTotalNote = $quizTotalNote;
return $this;
}
public function getStartAt(): ?\DateTimeInterface
{
return $this->startAt;
}
public function setStartAt(?\DateTimeInterface $startAt): self
{
$this->startAt = $startAt;
return $this;
}
public function getEndAt(): ?\DateTimeInterface
{
return $this->endAt;
}
public function setEndAt(?\DateTimeInterface $endAt): self
{
$this->endAt = $endAt;
return $this;
}
public function getQuizBadgeLabel(): ?string
{
return $this->quizBadgeLabel;
}
public function setQuizBadgeLabel(?string $quizBadgeLabel): self
{
$this->quizBadgeLabel = $quizBadgeLabel;
return $this;
}
public function getCustomAnswerCount(): ?int
{
return $this->customAnswerCount;
}
public function setCustomAnswerCount(?int $customAnswerCount): self
{
$this->customAnswerCount = $customAnswerCount;
return $this;
}
public function getQuizQuestionIds(): ?array
{
return $this->quizQuestionIds;
}
public function setQuizQuestionIds(?array $quizQuestionIds): self
{
$this->quizQuestionIds = $quizQuestionIds;
return $this;
}
}