You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
114 lines
2.2 KiB
114 lines
2.2 KiB
<?php
|
|
namespace Entity;
|
|
|
|
class ResultsEntity
|
|
{
|
|
// Property to store the quiz ID
|
|
private int $idQuiz;
|
|
|
|
// Property to store the user ID
|
|
private int $idUser;
|
|
|
|
// Property to store the number of points
|
|
private int $nbPts;
|
|
|
|
// Property to store the time
|
|
private int $time;
|
|
|
|
/**
|
|
* Constructor to initialize the properties
|
|
*
|
|
* @param int $idQuiz The ID of the quiz
|
|
* @param int $idUser The ID of the user
|
|
* @param int $time The time taken
|
|
* @param int $nbPts The number of points
|
|
*/
|
|
public function __construct(int $idQuiz, int $idUser, int $time, int $nbPts)
|
|
{
|
|
$this->idQuiz = $idQuiz;
|
|
$this->idUser = $idUser;
|
|
$this->time = $time;
|
|
$this->nbPts = $nbPts;
|
|
}
|
|
|
|
/**
|
|
* Get the user ID
|
|
*
|
|
* @return int The ID of the user
|
|
*/
|
|
public function getIdUser(): int
|
|
{
|
|
return $this->idUser;
|
|
}
|
|
|
|
/**
|
|
* Set the user ID
|
|
*
|
|
* @param int $idUser The ID of the user
|
|
*/
|
|
public function setIdUser(int $idUser): void
|
|
{
|
|
$this->idUser = $idUser;
|
|
}
|
|
|
|
/**
|
|
* Get the quiz ID
|
|
*
|
|
* @return int The ID of the quiz
|
|
*/
|
|
public function getIdQuiz(): int
|
|
{
|
|
return $this->idQuiz;
|
|
}
|
|
|
|
/**
|
|
* Set the quiz ID
|
|
*
|
|
* @param int $idQuiz The ID of the quiz
|
|
*/
|
|
public function setIdQuiz(int $idQuiz): void
|
|
{
|
|
$this->idQuiz = $idQuiz;
|
|
}
|
|
|
|
/**
|
|
* Get the time taken
|
|
*
|
|
* @return int The time taken
|
|
*/
|
|
public function getTime(): int
|
|
{
|
|
return $this->time;
|
|
}
|
|
|
|
/**
|
|
* Set the time taken
|
|
*
|
|
* @param int $time The time taken
|
|
*/
|
|
public function setTime(int $time): void
|
|
{
|
|
$this->time = $time;
|
|
}
|
|
|
|
/**
|
|
* Get the number of points
|
|
*
|
|
* @return int The number of points
|
|
*/
|
|
public function getNbPts(): int
|
|
{
|
|
return $this->nbPts;
|
|
}
|
|
|
|
/**
|
|
* Set the number of points
|
|
*
|
|
* @param int $nbPts The number of points
|
|
*/
|
|
public function setNbPts(int $nbPts): void
|
|
{
|
|
$this->nbPts = $nbPts;
|
|
}
|
|
}
|