src/Entity/MalusList.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MalusListRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassMalusListRepository::class)]
  8. class MalusList
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $label null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $label_en null;
  18.     #[ORM\Column]
  19.     private ?int $nb_lost_point null;
  20.     #[ORM\ManyToOne(inversedBy'malusLists')]
  21.     #[ORM\JoinColumn(nullablefalse)]
  22.     private ?Malus $malus null;
  23.     #[ORM\Column(nullabletrue)]
  24.     private ?int $sort null;
  25.     #[ORM\OneToMany(mappedBy'item'targetEntityResult::class)]
  26.     private Collection $results;
  27.     #[ORM\Column]
  28.     private ?bool $enabled null;
  29.     #[ORM\Column]
  30.     private ?bool $disqualify false;
  31.     public function __construct()
  32.     {
  33.         $this->results = new ArrayCollection();
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getLabel(): ?string
  40.     {
  41.         return $this->label;
  42.     }
  43.     public function setLabel(string $label): self
  44.     {
  45.         $this->label $label;
  46.         return $this;
  47.     }
  48.     public function getLabelEn(): ?string
  49.     {
  50.         return $this->label_en;
  51.     }
  52.     public function setLabelEn(string $label_en): self
  53.     {
  54.         $this->label_en $label_en;
  55.         return $this;
  56.     }
  57.     public function getNbLostPoint(): ?int
  58.     {
  59.         return $this->nb_lost_point;
  60.     }
  61.     public function setNbLostPoint(int $nb_lost_point): self
  62.     {
  63.         $this->nb_lost_point $nb_lost_point;
  64.         return $this;
  65.     }
  66.     public function getMalus(): ?Malus
  67.     {
  68.         return $this->malus;
  69.     }
  70.     public function setMalus(?Malus $malus): self
  71.     {
  72.         $this->malus $malus;
  73.         return $this;
  74.     }
  75.     public function getSort(): ?int
  76.     {
  77.         return $this->sort;
  78.     }
  79.     public function setSort(?int $sort): self
  80.     {
  81.         $this->sort $sort;
  82.         return $this;
  83.     }
  84.     /**
  85.      * @return Collection<int, Result>
  86.      */
  87.     public function getResults(): Collection
  88.     {
  89.         return $this->results;
  90.     }
  91.     public function addResult(Result $result): self
  92.     {
  93.         if (!$this->results->contains($result)) {
  94.             $this->results->add($result);
  95.             $result->setItem($this);
  96.         }
  97.         return $this;
  98.     }
  99.     public function removeResult(Result $result): self
  100.     {
  101.         if ($this->results->removeElement($result)) {
  102.             // set the owning side to null (unless already changed)
  103.             if ($result->getItem() === $this) {
  104.                 $result->setItem(null);
  105.             }
  106.         }
  107.         return $this;
  108.     }
  109.     public function isEnabled(): ?bool
  110.     {
  111.         return $this->enabled;
  112.     }
  113.     public function setEnabled(bool $enabled): self
  114.     {
  115.         $this->enabled $enabled;
  116.         return $this;
  117.     }
  118.     public function isDisqualify(): ?bool
  119.     {
  120.         return $this->disqualify;
  121.     }
  122.     public function setDisqualify(bool $disqualify): self
  123.     {
  124.         $this->disqualify $disqualify;
  125.         return $this;
  126.     }
  127. }