<?phpnamespace App\Entity;use App\Repository\MalusListRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: MalusListRepository::class)]class MalusList{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $label = null; #[ORM\Column(length: 255)] private ?string $label_en = null; #[ORM\Column] private ?int $nb_lost_point = null; #[ORM\ManyToOne(inversedBy: 'malusLists')] #[ORM\JoinColumn(nullable: false)] private ?Malus $malus = null; #[ORM\Column(nullable: true)] private ?int $sort = null; #[ORM\OneToMany(mappedBy: 'item', targetEntity: Result::class)] private Collection $results; #[ORM\Column] private ?bool $enabled = null; #[ORM\Column] private ?bool $disqualify = false; public function __construct() { $this->results = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getLabel(): ?string { return $this->label; } public function setLabel(string $label): self { $this->label = $label; return $this; } public function getLabelEn(): ?string { return $this->label_en; } public function setLabelEn(string $label_en): self { $this->label_en = $label_en; return $this; } public function getNbLostPoint(): ?int { return $this->nb_lost_point; } public function setNbLostPoint(int $nb_lost_point): self { $this->nb_lost_point = $nb_lost_point; return $this; } public function getMalus(): ?Malus { return $this->malus; } public function setMalus(?Malus $malus): self { $this->malus = $malus; return $this; } public function getSort(): ?int { return $this->sort; } public function setSort(?int $sort): self { $this->sort = $sort; return $this; } /** * @return Collection<int, Result> */ public function getResults(): Collection { return $this->results; } public function addResult(Result $result): self { if (!$this->results->contains($result)) { $this->results->add($result); $result->setItem($this); } return $this; } public function removeResult(Result $result): self { if ($this->results->removeElement($result)) { // set the owning side to null (unless already changed) if ($result->getItem() === $this) { $result->setItem(null); } } return $this; } public function isEnabled(): ?bool { return $this->enabled; } public function setEnabled(bool $enabled): self { $this->enabled = $enabled; return $this; } public function isDisqualify(): ?bool { return $this->disqualify; } public function setDisqualify(bool $disqualify): self { $this->disqualify = $disqualify; return $this; }}