<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\User;
use App\Entity\Instance;
/**
* @ORM\Entity
* @ORM\Table(name="scoring_archives")
*/
class ScoringArchive
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/** @ORM\ManyToOne(targetEntity=User::class) */
private $user;
/** @ORM\Column(type="integer") */
private $scoringId;
/** @ORM\Column(type="integer") */
private $quizId;
/** @ORM\Column(type="string", length=255) */
private $quizTitle;
/** @ORM\Column(type="string", length=255, nullable=true) */
private $quizCode;
/** @ORM\Column(type="float", nullable=true) */
private $scoreTotal;
/** @ORM\Column(type="float", nullable=true) */
private $scorePondere;
/** @ORM\Column(type="integer", nullable=true) */
private $nbQuestions;
/** @ORM\Column(type="datetime") */
private $startDate;
/** @ORM\Column(type="datetime") */
private $endDate;
/** @ORM\Column(type="datetime") */
private $archivedAt;
// Champs spécifiques à la réponse
/** @ORM\Column(type="integer", nullable=true) */
private $sectionId;
/** @ORM\Column(type="string", length=255, nullable=true) */
private $sectionTitle;
/** @ORM\Column(type="integer") */
private $questionId;
/** @ORM\Column(type="string", length=255) */
private $questionLabel;
/** @ORM\Column(type="float", options={"default":1.0}) */
private $questionWeight = 1.0;
/** @ORM\Column(type="integer") */
private $points;
/** @ORM\Column(type="integer", nullable=true)*/
private $answerIndex;
/** @ORM\Column(type="string", length=255, nullable=true) */
private $proposition1Label;
/** @ORM\Column(type="string", length=255, nullable=true) */
private $proposition2Label;
/** @ORM\Column(type="string", length=255, nullable=true) */
private $proposition3Label;
/** @ORM\Column(type="string", length=255, nullable=true) */
private $proposition4Label;
/** @ORM\Column(type="string", length=255, nullable=true) */
private $proposition5Label;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $scoringQuestionId;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $propositionIndex;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $proposition1Points;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $proposition2Points;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $proposition3Points;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $proposition4Points;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $proposition5Points;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $comment;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $fileName;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $answerUpdatedAt;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $questionDescription;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $questionSubDescription;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $questionImageUrl;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $questionImageActive;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $questionCommentActive;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $questionSort;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $weightedScore;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $reco;
// ---------- Getters & Setters ----------
/**
* Instance associée à l’archive (nullable pour compatibilité)
* @ORM\ManyToOne(targetEntity=Instance::class)
* @ORM\JoinColumn(name="instance_id", referencedColumnName="id", nullable=true, onDelete="SET NULL")
*/
private ?Instance $instance = null;
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getScoringId(): ?int
{
return $this->scoringId;
}
public function setScoringId(int $scoringId): self
{
$this->scoringId = $scoringId;
return $this;
}
public function getQuizId(): ?int
{
return $this->quizId;
}
public function setQuizId(int $quizId): self
{
$this->quizId = $quizId;
return $this;
}
public function getQuizTitle(): ?string
{
return $this->quizTitle;
}
public function setQuizTitle(string $quizTitle): self
{
$this->quizTitle = $quizTitle;
return $this;
}
public function getQuizCode(): ?string
{
return $this->quizCode;
}
public function setQuizCode(?string $quizCode): self
{
$this->quizCode = $quizCode;
return $this;
}
public function getScoreTotal(): ?float
{
return $this->scoreTotal;
}
public function setScoreTotal(?float $scoreTotal): self
{
$this->scoreTotal = $scoreTotal;
return $this;
}
public function getScorePondere(): ?float
{
return $this->scorePondere;
}
public function setScorePondere(?float $scorePondere): self
{
$this->scorePondere = $scorePondere;
return $this;
}
public function getNbQuestions(): ?int
{
return $this->nbQuestions;
}
public function setNbQuestions(?int $nbQuestions): self
{
$this->nbQuestions = $nbQuestions;
return $this;
}
public function setStatutTermine(bool $statutTermine): self
{
$this->statutTermine = $statutTermine;
return $this;
}
public function getStartDate(): ?\DateTimeInterface
{
return $this->startDate;
}
public function setStartDate(\DateTimeInterface $startDate): self
{
$this->startDate = $startDate;
return $this;
}
public function getEndDate(): ?\DateTimeInterface
{
return $this->endDate;
}
public function setEndDate(\DateTimeInterface $endDate): self
{
$this->endDate = $endDate;
return $this;
}
public function getArchivedAt(): ?\DateTimeInterface
{
return $this->archivedAt;
}
public function setArchivedAt(\DateTimeInterface $archivedAt): self
{
$this->archivedAt = $archivedAt;
return $this;
}
public function getSectionId(): ?int
{
return $this->sectionId;
}
public function setSectionId(?int $sectionId): self
{
$this->sectionId = $sectionId;
return $this;
}
public function getSectionTitle(): ?string
{
return $this->sectionTitle;
}
public function setSectionTitle(?string $sectionTitle): self
{
$this->sectionTitle = $sectionTitle;
return $this;
}
public function getQuestionId(): ?int
{
return $this->questionId;
}
public function setQuestionId(int $questionId): self
{
$this->questionId = $questionId;
return $this;
}
public function getQuestionLabel(): ?string
{
return $this->questionLabel;
}
public function setQuestionLabel(string $questionLabel): self
{
$this->questionLabel = $questionLabel;
return $this;
}
public function getQuestionWeight(): ?float
{
return $this->questionWeight;
}
public function setQuestionWeight(float $questionWeight): self
{
$this->questionWeight = $questionWeight;
return $this;
}
public function getPoints(): ?int
{
return $this->points;
}
public function setPoints(int $points): self
{
$this->points = $points;
return $this;
}
public function getAnswerIndex(): ?int
{
return $this->answerIndex;
}
public function setAnswerIndex(?int $answerIndex): self
{
$this->answerIndex = $answerIndex;
return $this;
}
public function getProposition1Label(): ?string
{
return $this->proposition1Label;
}
public function setProposition1Label(?string $label): self
{
$this->proposition1Label = $label;
return $this;
}
public function getProposition2Label(): ?string
{
return $this->proposition2Label;
}
public function setProposition2Label(?string $label): self
{
$this->proposition2Label = $label;
return $this;
}
public function getProposition3Label(): ?string
{
return $this->proposition3Label;
}
public function setProposition3Label(?string $label): self
{
$this->proposition3Label = $label;
return $this;
}
public function getProposition4Label(): ?string
{
return $this->proposition4Label;
}
public function setProposition4Label(?string $label): self
{
$this->proposition4Label = $label;
return $this;
}
public function getProposition5Label(): ?string
{
return $this->proposition5Label;
}
public function setProposition5Label(?string $label): self
{
$this->proposition5Label = $label;
return $this;
}
public function getScoringQuestionId(): ?int
{
return $this->scoringQuestionId;
}
public function setScoringQuestionId(?int $scoringQuestionId): self
{
$this->scoringQuestionId = $scoringQuestionId;
return $this;
}
public function getPropositionIndex(): ?int
{
return $this->propositionIndex;
}
public function setPropositionIndex(?int $propositionIndex): self
{
$this->propositionIndex = $propositionIndex;
return $this;
}
public function getProposition1Points(): ?int
{
return $this->proposition1Points;
}
public function setProposition1Points(?int $points): self
{
$this->proposition1Points = $points;
return $this;
}
public function getProposition2Points(): ?int
{
return $this->proposition2Points;
}
public function setProposition2Points(?int $points): self
{
$this->proposition2Points = $points;
return $this;
}
public function getProposition3Points(): ?int
{
return $this->proposition3Points;
}
public function setProposition3Points(?int $points): self
{
$this->proposition3Points = $points;
return $this;
}
public function getProposition4Points(): ?int
{
return $this->proposition4Points;
}
public function setProposition4Points(?int $points): self
{
$this->proposition4Points = $points;
return $this;
}
public function getProposition5Points(): ?int
{
return $this->proposition5Points;
}
public function setProposition5Points(?int $points): self
{
$this->proposition5Points = $points;
return $this;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): self
{
$this->comment = $comment;
return $this;
}
public function getFileName(): ?string
{
return $this->fileName;
}
public function setFileName(?string $fileName): self
{
$this->fileName = $fileName;
return $this;
}
public function getAnswerUpdatedAt(): ?\DateTimeInterface
{
return $this->answerUpdatedAt;
}
public function setAnswerUpdatedAt(?\DateTimeInterface $answerUpdatedAt): self
{
$this->answerUpdatedAt = $answerUpdatedAt;
return $this;
}
public function getQuestionDescription(): ?string
{
return $this->questionDescription;
}
public function setQuestionDescription(?string $questionDescription): self
{
$this->questionDescription = $questionDescription;
return $this;
}
public function getQuestionSubDescription(): ?string
{
return $this->questionSubDescription;
}
public function setQuestionSubDescription(?string $questionSubDescription): self
{
$this->questionSubDescription = $questionSubDescription;
return $this;
}
public function getQuestionImageUrl(): ?string
{
return $this->questionImageUrl;
}
public function setQuestionImageUrl(?string $questionImageUrl): self
{
$this->questionImageUrl = $questionImageUrl;
return $this;
}
public function isQuestionImageActive(): ?bool
{
return $this->questionImageActive;
}
public function setQuestionImageActive(?bool $questionImageActive): self
{
$this->questionImageActive = $questionImageActive;
return $this;
}
public function isQuestionCommentActive(): ?bool
{
return $this->questionCommentActive;
}
public function setQuestionCommentActive(?bool $questionCommentActive): self
{
$this->questionCommentActive = $questionCommentActive;
return $this;
}
public function getQuestionSort(): ?int
{
return $this->questionSort;
}
public function setQuestionSort(?int $questionSort): self
{
$this->questionSort = $questionSort;
return $this;
}
public function getWeightedScore(): ?float
{
return $this->weightedScore;
}
public function setWeightedScore(?float $weightedScore): self
{
$this->weightedScore = $weightedScore;
return $this;
}
public function getReco(): ?string
{
return $this->reco;
}
public function setReco(?string $reco): self
{
$this->reco = $reco;
return $this;
}
public function getInstance(): ?Instance
{
return $this->instance;
}
public function setInstance(?Instance $instance): self
{
$this->instance = $instance;
return $this;
}
}