src/Entity/Gos/Uniqskills/UserTest.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos\Uniqskills;
  3. use App\Entity\Gos\User;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. /**
  7.  * @ORM\Table()
  8.  * @ORM\Entity(repositoryClass="App\Repository\Gos\Uniqskills\UserTestRepository")
  9.  * @ORM\HasLifecycleCallbacks
  10.  */
  11. class UserTest
  12. {
  13.     /**
  14.      * @var integer
  15.      *
  16.      * @ORM\Column(type="integer")
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var integer
  23.      * @ORM\Column(type="integer")
  24.      */
  25.     private $points;
  26.     /**
  27.      * @var integer
  28.      * @ORM\Column(type="integer")
  29.      */
  30.     private $educationPoints;
  31.     /**
  32.      * @var integer
  33.      * @ORM\Column(type="integer")
  34.      */
  35.     private $goodAnswers;
  36.     /**
  37.      * @var integer
  38.      * @ORM\Column(type="integer")
  39.      */
  40.     private $wrongAnswers;
  41.     /**
  42.      * @var bool
  43.      * @ORM\Column(type="boolean")
  44.      */
  45.     private $isPassed;
  46.     /**
  47.      * @var bool
  48.      * @ORM\Column(type="boolean")
  49.      */
  50.     private $isChecked;
  51.     /**
  52.      * @var integer
  53.      * @ORM\Column(type="integer")
  54.      */
  55.     private $sumCompleted;
  56.     /**
  57.      * @var \DateTime
  58.      *
  59.      * @ORM\Column(type="datetime", nullable=true)
  60.      */
  61.     private $createdAt;
  62.     /**
  63.      * @var \DateTime
  64.      *
  65.      * @ORM\Column(type="datetime", nullable=true)
  66.      */
  67.     private $updatedAt;
  68.     /**
  69.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\User", inversedBy="userTest")
  70.      * @ORM\JoinColumn()
  71.      */
  72.     private $user;
  73.     /**
  74.      * @ORM\ManyToOne(targetEntity="Test", inversedBy="userTest")
  75.      * @ORM\JoinColumn(name="test_id", referencedColumnName="id", onDelete="cascade")
  76.      */
  77.     private $test;
  78.     /** @ORM\PrePersist() */
  79.     public function prePersist()
  80.     {
  81.         $this->createdAt = new \DateTime();
  82.     }
  83.     /** @ORM\PreUpdate() */
  84.     public function preUpdate()
  85.     {
  86.         $this->updatedAt = new \DateTime();
  87.     }
  88.     public function __toString()
  89.     {
  90.         return (string) $this->id;
  91.     }
  92.     public function __clone()
  93.     {
  94.         $this->id           null;
  95.         $this->updatedAt    null;
  96.     }
  97.     public function getId(): ?int
  98.     {
  99.         return $this->id;
  100.     }
  101.     public function getPoints(): ?int
  102.     {
  103.         return $this->points;
  104.     }
  105.     public function setPoints(int $points): self
  106.     {
  107.         $this->points $points;
  108.         return $this;
  109.     }
  110.     public function getEducationPoints(): ?int
  111.     {
  112.         return $this->educationPoints;
  113.     }
  114.     public function setEducationPoints(int $educationPoints): self
  115.     {
  116.         $this->educationPoints $educationPoints;
  117.         return $this;
  118.     }
  119.     public function getGoodAnswers(): ?int
  120.     {
  121.         return $this->goodAnswers;
  122.     }
  123.     public function setGoodAnswers(int $goodAnswers): self
  124.     {
  125.         $this->goodAnswers $goodAnswers;
  126.         return $this;
  127.     }
  128.     public function getWrongAnswers(): ?int
  129.     {
  130.         return $this->wrongAnswers;
  131.     }
  132.     public function setWrongAnswers(int $wrongAnswers): self
  133.     {
  134.         $this->wrongAnswers $wrongAnswers;
  135.         return $this;
  136.     }
  137.     public function getIsPassed(): ?bool
  138.     {
  139.         return $this->isPassed;
  140.     }
  141.     public function setIsPassed(bool $isPassed): self
  142.     {
  143.         $this->isPassed $isPassed;
  144.         return $this;
  145.     }
  146.     public function getIsChecked(): ?bool
  147.     {
  148.         return $this->isChecked;
  149.     }
  150.     public function setIsChecked(bool $isChecked): self
  151.     {
  152.         $this->isChecked $isChecked;
  153.         return $this;
  154.     }
  155.     public function getSumCompleted(): ?int
  156.     {
  157.         return $this->sumCompleted;
  158.     }
  159.     public function setSumCompleted(int $sumCompleted): self
  160.     {
  161.         $this->sumCompleted $sumCompleted;
  162.         return $this;
  163.     }
  164.     public function getCreatedAt(): ?\DateTimeInterface
  165.     {
  166.         return $this->createdAt;
  167.     }
  168.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  169.     {
  170.         $this->createdAt $createdAt;
  171.         return $this;
  172.     }
  173.     public function getUpdatedAt(): ?\DateTimeInterface
  174.     {
  175.         return $this->updatedAt;
  176.     }
  177.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  178.     {
  179.         $this->updatedAt $updatedAt;
  180.         return $this;
  181.     }
  182.     public function getUser(): ?User
  183.     {
  184.         return $this->user;
  185.     }
  186.     public function setUser(?User $user): self
  187.     {
  188.         $this->user $user;
  189.         return $this;
  190.     }
  191.     public function getTest(): ?Test
  192.     {
  193.         return $this->test;
  194.     }
  195.     public function setTest(?Test $test): self
  196.     {
  197.         $this->test $test;
  198.         return $this;
  199.     }
  200.     /* ****************************** GETTERS & SETTERS ******************************  */
  201. }