src/Entity/ScoringArchive.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Entity\User;
  5. use App\Entity\Instance;
  6. /**
  7.  * @ORM\Entity
  8.  * @ORM\Table(name="scoring_archives")
  9.  */
  10. class ScoringArchive
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /** @ORM\ManyToOne(targetEntity=User::class) */
  19.     private $user;
  20.     /** @ORM\Column(type="integer") */
  21.     private $scoringId;
  22.     /** @ORM\Column(type="integer") */
  23.     private $quizId;
  24.     /** @ORM\Column(type="string", length=255) */
  25.     private $quizTitle;
  26.     /** @ORM\Column(type="string", length=255, nullable=true) */
  27.     private $quizCode;
  28.     /** @ORM\Column(type="float", nullable=true) */
  29.     private $scoreTotal;
  30.     /** @ORM\Column(type="float", nullable=true) */
  31.     private $scorePondere;
  32.     /** @ORM\Column(type="integer", nullable=true) */
  33.     private $nbQuestions;
  34.     /** @ORM\Column(type="datetime") */
  35.     private $startDate;
  36.     /** @ORM\Column(type="datetime") */
  37.     private $endDate;
  38.     /** @ORM\Column(type="datetime") */
  39.     private $archivedAt;
  40.     // Champs spécifiques à la réponse
  41.     /** @ORM\Column(type="integer", nullable=true) */
  42.     private $sectionId;
  43.     /** @ORM\Column(type="string", length=255, nullable=true) */
  44.     private $sectionTitle;
  45.     /** @ORM\Column(type="integer") */
  46.     private $questionId;
  47.     /** @ORM\Column(type="string", length=255) */
  48.     private $questionLabel;
  49.     /** @ORM\Column(type="float", options={"default":1.0}) */
  50.     private $questionWeight 1.0;
  51.     /** @ORM\Column(type="integer") */
  52.     private $points;
  53.     /** @ORM\Column(type="integer", nullable=true)*/
  54.     private $answerIndex;
  55.     /** @ORM\Column(type="string", length=255, nullable=true) */
  56.     private $proposition1Label;
  57.     /** @ORM\Column(type="string", length=255, nullable=true) */
  58.     private $proposition2Label;
  59.     /** @ORM\Column(type="string", length=255, nullable=true) */
  60.     private $proposition3Label;
  61.     /** @ORM\Column(type="string", length=255, nullable=true) */
  62.     private $proposition4Label;
  63.     /** @ORM\Column(type="string", length=255, nullable=true) */
  64.     private $proposition5Label;
  65.     /**
  66.      * @ORM\Column(type="integer", nullable=true)
  67.      */
  68.     private $scoringQuestionId;
  69.     /**
  70.      * @ORM\Column(type="integer", nullable=true)
  71.      */
  72.     private $propositionIndex;
  73.     /**
  74.      * @ORM\Column(type="integer", nullable=true)
  75.      */
  76.     private $proposition1Points;
  77.     /**
  78.      * @ORM\Column(type="integer", nullable=true)
  79.      */
  80.     private $proposition2Points;
  81.     /**
  82.      * @ORM\Column(type="integer", nullable=true)
  83.      */
  84.     private $proposition3Points;
  85.     /**
  86.      * @ORM\Column(type="integer", nullable=true)
  87.      */
  88.     private $proposition4Points;
  89.     /**
  90.      * @ORM\Column(type="integer", nullable=true)
  91.      */
  92.     private $proposition5Points;
  93.     /**
  94.      * @ORM\Column(type="string", length=255, nullable=true)
  95.      */
  96.     private $comment;
  97.     /**
  98.      * @ORM\Column(type="string", length=255, nullable=true)
  99.      */
  100.     private $fileName;
  101.     /**
  102.      * @ORM\Column(type="datetime", nullable=true)
  103.      */
  104.     private $answerUpdatedAt;
  105.     /**
  106.      * @ORM\Column(type="string", length=255, nullable=true)
  107.      */
  108.     private $questionDescription;
  109.     /**
  110.      * @ORM\Column(type="string", length=255, nullable=true)
  111.      */
  112.     private $questionSubDescription;
  113.     /**
  114.      * @ORM\Column(type="string", length=255, nullable=true)
  115.      */
  116.     private $questionImageUrl;
  117.     /**
  118.      * @ORM\Column(type="boolean", nullable=true)
  119.      */
  120.     private $questionImageActive;
  121.     /**
  122.      * @ORM\Column(type="boolean", nullable=true)
  123.      */
  124.     private $questionCommentActive;
  125.     /**
  126.      * @ORM\Column(type="integer", nullable=true)
  127.      */
  128.     private $questionSort;
  129.     /**
  130.      * @ORM\Column(type="float", nullable=true)
  131.      */
  132.     private $weightedScore;
  133.     /**
  134.      * @ORM\Column(type="text", nullable=true)
  135.      */
  136.     private $reco;
  137.     // ---------- Getters & Setters ----------
  138.     /**
  139.      * Instance associée à l’archive (nullable pour compatibilité)
  140.      * @ORM\ManyToOne(targetEntity=Instance::class)
  141.      * @ORM\JoinColumn(name="instance_id", referencedColumnName="id", nullable=true, onDelete="SET NULL")
  142.      */
  143.     private ?Instance $instance null;
  144.     public function getId(): ?int
  145.     {
  146.         return $this->id;
  147.     }
  148.     public function getUser(): ?User
  149.     {
  150.         return $this->user;
  151.     }
  152.     public function setUser(?User $user): self
  153.     {
  154.         $this->user $user;
  155.         return $this;
  156.     }
  157.     public function getScoringId(): ?int
  158.     {
  159.         return $this->scoringId;
  160.     }
  161.     public function setScoringId(int $scoringId): self
  162.     {
  163.         $this->scoringId $scoringId;
  164.         return $this;
  165.     }
  166.     public function getQuizId(): ?int
  167.     {
  168.         return $this->quizId;
  169.     }
  170.     public function setQuizId(int $quizId): self
  171.     {
  172.         $this->quizId $quizId;
  173.         return $this;
  174.     }
  175.     public function getQuizTitle(): ?string
  176.     {
  177.         return $this->quizTitle;
  178.     }
  179.     public function setQuizTitle(string $quizTitle): self
  180.     {
  181.         $this->quizTitle $quizTitle;
  182.         return $this;
  183.     }
  184.     public function getQuizCode(): ?string
  185.     {
  186.         return $this->quizCode;
  187.     }
  188.     public function setQuizCode(?string $quizCode): self
  189.     {
  190.         $this->quizCode $quizCode;
  191.         return $this;
  192.     }
  193.     public function getScoreTotal(): ?float
  194.     {
  195.         return $this->scoreTotal;
  196.     }
  197.     public function setScoreTotal(?float $scoreTotal): self
  198.     {
  199.         $this->scoreTotal $scoreTotal;
  200.         return $this;
  201.     }
  202.     public function getScorePondere(): ?float
  203.     {
  204.         return $this->scorePondere;
  205.     }
  206.     public function setScorePondere(?float $scorePondere): self
  207.     {
  208.         $this->scorePondere $scorePondere;
  209.         return $this;
  210.     }
  211.     public function getNbQuestions(): ?int
  212.     {
  213.         return $this->nbQuestions;
  214.     }
  215.     public function setNbQuestions(?int $nbQuestions): self
  216.     {
  217.         $this->nbQuestions $nbQuestions;
  218.         return $this;
  219.     }
  220.     public function setStatutTermine(bool $statutTermine): self
  221.     {
  222.         $this->statutTermine $statutTermine;
  223.         return $this;
  224.     }
  225.     public function getStartDate(): ?\DateTimeInterface
  226.     {
  227.         return $this->startDate;
  228.     }
  229.     public function setStartDate(\DateTimeInterface $startDate): self
  230.     {
  231.         $this->startDate $startDate;
  232.         return $this;
  233.     }
  234.     public function getEndDate(): ?\DateTimeInterface
  235.     {
  236.         return $this->endDate;
  237.     }
  238.     public function setEndDate(\DateTimeInterface $endDate): self
  239.     {
  240.         $this->endDate $endDate;
  241.         return $this;
  242.     }
  243.     public function getArchivedAt(): ?\DateTimeInterface
  244.     {
  245.         return $this->archivedAt;
  246.     }
  247.     public function setArchivedAt(\DateTimeInterface $archivedAt): self
  248.     {
  249.         $this->archivedAt $archivedAt;
  250.         return $this;
  251.     }
  252.     public function getSectionId(): ?int
  253.     {
  254.         return $this->sectionId;
  255.     }
  256.     public function setSectionId(?int $sectionId): self
  257.     {
  258.         $this->sectionId $sectionId;
  259.         return $this;
  260.     }
  261.     public function getSectionTitle(): ?string
  262.     {
  263.         return $this->sectionTitle;
  264.     }
  265.     public function setSectionTitle(?string $sectionTitle): self
  266.     {
  267.         $this->sectionTitle $sectionTitle;
  268.         return $this;
  269.     }
  270.     public function getQuestionId(): ?int
  271.     {
  272.         return $this->questionId;
  273.     }
  274.     public function setQuestionId(int $questionId): self
  275.     {
  276.         $this->questionId $questionId;
  277.         return $this;
  278.     }
  279.     public function getQuestionLabel(): ?string
  280.     {
  281.         return $this->questionLabel;
  282.     }
  283.     public function setQuestionLabel(string $questionLabel): self
  284.     {
  285.         $this->questionLabel $questionLabel;
  286.         return $this;
  287.     }
  288.     public function getQuestionWeight(): ?float
  289.     {
  290.         return $this->questionWeight;
  291.     }
  292.     public function setQuestionWeight(float $questionWeight): self
  293.     {
  294.         $this->questionWeight $questionWeight;
  295.         return $this;
  296.     }
  297.     public function getPoints(): ?int
  298.     {
  299.         return $this->points;
  300.     }
  301.     public function setPoints(int $points): self
  302.     {
  303.         $this->points $points;
  304.         return $this;
  305.     }
  306.     public function getAnswerIndex(): ?int
  307.     {
  308.         return $this->answerIndex;
  309.     }
  310.     public function setAnswerIndex(?int $answerIndex): self
  311.     {
  312.         $this->answerIndex $answerIndex;
  313.         return $this;
  314.     }
  315.     public function getProposition1Label(): ?string
  316.     {
  317.         return $this->proposition1Label;
  318.     }
  319.     public function setProposition1Label(?string $label): self
  320.     {
  321.         $this->proposition1Label $label;
  322.         return $this;
  323.     }
  324.     public function getProposition2Label(): ?string
  325.     {
  326.         return $this->proposition2Label;
  327.     }
  328.     public function setProposition2Label(?string $label): self
  329.     {
  330.         $this->proposition2Label $label;
  331.         return $this;
  332.     }
  333.     public function getProposition3Label(): ?string
  334.     {
  335.         return $this->proposition3Label;
  336.     }
  337.     public function setProposition3Label(?string $label): self
  338.     {
  339.         $this->proposition3Label $label;
  340.         return $this;
  341.     }
  342.     public function getProposition4Label(): ?string
  343.     {
  344.         return $this->proposition4Label;
  345.     }
  346.     public function setProposition4Label(?string $label): self
  347.     {
  348.         $this->proposition4Label $label;
  349.         return $this;
  350.     }
  351.     public function getProposition5Label(): ?string
  352.     {
  353.         return $this->proposition5Label;
  354.     }
  355.     public function setProposition5Label(?string $label): self
  356.     {
  357.         $this->proposition5Label $label;
  358.         return $this;
  359.     }
  360.     public function getScoringQuestionId(): ?int
  361.     {
  362.         return $this->scoringQuestionId;
  363.     }
  364.     public function setScoringQuestionId(?int $scoringQuestionId): self
  365.     {
  366.         $this->scoringQuestionId $scoringQuestionId;
  367.         return $this;
  368.     }
  369.     public function getPropositionIndex(): ?int
  370.     {
  371.         return $this->propositionIndex;
  372.     }
  373.     public function setPropositionIndex(?int $propositionIndex): self
  374.     {
  375.         $this->propositionIndex $propositionIndex;
  376.         return $this;
  377.     }
  378.     public function getProposition1Points(): ?int
  379.     {
  380.         return $this->proposition1Points;
  381.     }
  382.     public function setProposition1Points(?int $points): self
  383.     {
  384.         $this->proposition1Points $points;
  385.         return $this;
  386.     }
  387.     public function getProposition2Points(): ?int
  388.     {
  389.         return $this->proposition2Points;
  390.     }
  391.     public function setProposition2Points(?int $points): self
  392.     {
  393.         $this->proposition2Points $points;
  394.         return $this;
  395.     }
  396.     public function getProposition3Points(): ?int
  397.     {
  398.         return $this->proposition3Points;
  399.     }
  400.     public function setProposition3Points(?int $points): self
  401.     {
  402.         $this->proposition3Points $points;
  403.         return $this;
  404.     }
  405.     public function getProposition4Points(): ?int
  406.     {
  407.         return $this->proposition4Points;
  408.     }
  409.     public function setProposition4Points(?int $points): self
  410.     {
  411.         $this->proposition4Points $points;
  412.         return $this;
  413.     }
  414.     public function getProposition5Points(): ?int
  415.     {
  416.         return $this->proposition5Points;
  417.     }
  418.     public function setProposition5Points(?int $points): self
  419.     {
  420.         $this->proposition5Points $points;
  421.         return $this;
  422.     }
  423.     public function getComment(): ?string
  424.     {
  425.         return $this->comment;
  426.     }
  427.     public function setComment(?string $comment): self
  428.     {
  429.         $this->comment $comment;
  430.         return $this;
  431.     }
  432.     public function getFileName(): ?string
  433.     {
  434.         return $this->fileName;
  435.     }
  436.     public function setFileName(?string $fileName): self
  437.     {
  438.         $this->fileName $fileName;
  439.         return $this;
  440.     }
  441.     public function getAnswerUpdatedAt(): ?\DateTimeInterface
  442.     {
  443.         return $this->answerUpdatedAt;
  444.     }
  445.     public function setAnswerUpdatedAt(?\DateTimeInterface $answerUpdatedAt): self
  446.     {
  447.         $this->answerUpdatedAt $answerUpdatedAt;
  448.         return $this;
  449.     }
  450.     public function getQuestionDescription(): ?string
  451.     {
  452.         return $this->questionDescription;
  453.     }
  454.     public function setQuestionDescription(?string $questionDescription): self
  455.     {
  456.         $this->questionDescription $questionDescription;
  457.         return $this;
  458.     }
  459.     public function getQuestionSubDescription(): ?string
  460.     {
  461.         return $this->questionSubDescription;
  462.     }
  463.     public function setQuestionSubDescription(?string $questionSubDescription): self
  464.     {
  465.         $this->questionSubDescription $questionSubDescription;
  466.         return $this;
  467.     }
  468.     public function getQuestionImageUrl(): ?string
  469.     {
  470.         return $this->questionImageUrl;
  471.     }
  472.     public function setQuestionImageUrl(?string $questionImageUrl): self
  473.     {
  474.         $this->questionImageUrl $questionImageUrl;
  475.         return $this;
  476.     }
  477.     public function isQuestionImageActive(): ?bool
  478.     {
  479.         return $this->questionImageActive;
  480.     }
  481.     public function setQuestionImageActive(?bool $questionImageActive): self
  482.     {
  483.         $this->questionImageActive $questionImageActive;
  484.         return $this;
  485.     }
  486.     public function isQuestionCommentActive(): ?bool
  487.     {
  488.         return $this->questionCommentActive;
  489.     }
  490.     public function setQuestionCommentActive(?bool $questionCommentActive): self
  491.     {
  492.         $this->questionCommentActive $questionCommentActive;
  493.         return $this;
  494.     }
  495.     public function getQuestionSort(): ?int
  496.     {
  497.         return $this->questionSort;
  498.     }
  499.     public function setQuestionSort(?int $questionSort): self
  500.     {
  501.         $this->questionSort $questionSort;
  502.         return $this;
  503.     }
  504.     public function getWeightedScore(): ?float
  505.     {
  506.         return $this->weightedScore;
  507.     }
  508.     public function setWeightedScore(?float $weightedScore): self
  509.     {
  510.         $this->weightedScore $weightedScore;
  511.         return $this;
  512.     }
  513.     public function getReco(): ?string
  514.     {
  515.         return $this->reco;
  516.     }
  517.     public function setReco(?string $reco): self
  518.     {
  519.         $this->reco $reco;
  520.         return $this;
  521.     }
  522.      public function getInstance(): ?Instance
  523.     {
  524.         return $this->instance;
  525.     }
  526.     public function setInstance(?Instance $instance): self
  527.     {
  528.         $this->instance $instance;
  529.         return $this;
  530.     }
  531. }