src/Entity/TrainingRequestHistory.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * TrainingRequestHistory
  6.  *
  7.  * @ORM\Table(name="training_request_history", uniqueConstraints={@ORM\UniqueConstraint(name="training_request_history_id_uindex", columns={"id"})}, indexes={@ORM\Index(name="training_request_history_training_request_id_fk", columns={"training_request_id"})})
  8.  * @ORM\Entity(repositoryClass="App\Repository\TrainingRequestHistoryRepository")
  9.  */
  10. class TrainingRequestHistory
  11. {
  12.     /**
  13.      * @var integer
  14.      *
  15.      * @ORM\Column(name="id", type="integer", nullable=false)
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="IDENTITY")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @var \DateTime
  22.      *
  23.      * @ORM\Column(name="answer_date", type="datetime", nullable=true)
  24.      */
  25.     private $answerDate;
  26.     /**
  27.      * @var array
  28.      *
  29.      * @ORM\Column(name="user_answers", type="array", nullable=true)
  30.      */
  31.     private $userAnswers;
  32.     /**
  33.      * @var float
  34.      *
  35.      * @ORM\Column(name="result", type="float", precision=10, scale=0, nullable=true)
  36.      */
  37.     private $result 0;
  38.     /**
  39.      * @var TrainingRequest
  40.      *
  41.      * @ORM\ManyToOne(targetEntity="TrainingRequest", inversedBy="histories")
  42.      * @ORM\JoinColumns({
  43.      *   @ORM\JoinColumn(name="training_request_id", referencedColumnName="id")
  44.      * })
  45.      */
  46.     private $trainingRequest;
  47.     /**
  48.      * @return int
  49.      */
  50.     public function getId(): int
  51.     {
  52.         return $this->id;
  53.     }
  54.     /**
  55.      * @param int $id
  56.      */
  57.     public function setId(int $id): void
  58.     {
  59.         $this->id $id;
  60.     }
  61.     /**
  62.      * @return \DateTime
  63.      */
  64.     public function getAnswerDate(): \DateTime
  65.     {
  66.         return $this->answerDate;
  67.     }
  68.     /**
  69.      * @param \DateTime $answerDate
  70.      */
  71.     public function setAnswerDate(\DateTime $answerDate): void
  72.     {
  73.         $this->answerDate $answerDate;
  74.     }
  75.     /**
  76.      * @return array
  77.      */
  78.     public function getUserAnswers(): array
  79.     {
  80.         return $this->userAnswers;
  81.     }
  82.     /**
  83.      * @param array $userAnswers
  84.      */
  85.     public function setUserAnswers(array $userAnswers): void
  86.     {
  87.         $this->userAnswers $userAnswers;
  88.     }
  89.     /**
  90.      * @return float
  91.      */
  92.     public function getResult()
  93.     {
  94.         return $this->result;
  95.     }
  96.     /**
  97.      * @param float $result
  98.      */
  99.     public function setResult($result): void
  100.     {
  101.         $this->result $result;
  102.     }
  103.     /**
  104.      * @return TrainingRequest
  105.      */
  106.     public function getTrainingRequest(): TrainingRequest
  107.     {
  108.         return $this->trainingRequest;
  109.     }
  110.     /**
  111.      * @param TrainingRequest $trainingRequest
  112.      */
  113.     public function setTrainingRequest(TrainingRequest $trainingRequest): void
  114.     {
  115.         $this->trainingRequest $trainingRequest;
  116.     }
  117. }