*/ #[ORM\OneToMany(targetEntity: EducationNotation::class, mappedBy: 'criteriaNotation')] private Collection $educationNotations; /** @var Collection */ #[ORM\OneToMany(targetEntity: CustomNotation::class, mappedBy: 'criteriaNotation', cascade: ['persist', 'remove'], orphanRemoval: true)] private Collection $customNotation; /** @var Collection */ #[ORM\OneToMany(targetEntity: EducationNotationCriteriaConfig::class, mappedBy: 'criteriaNotation', cascade: ['persist', 'remove'], orphanRemoval: true)] private Collection $educationNotationCriteriaConfigs; #[ORM\Column(length: 50, enumType: TypeCriteriaEnum::class)] private TypeCriteriaEnum $type; #[ORM\Column] #[Assert\GreaterThanOrEqual(value: 0)] #[Assert\Range(notInRangeMessage: 'between_{{ min }}_and_{{ max }}', min: 0, max: 100)] private int $noteMax; public function __construct() { $this->educationNotations = new ArrayCollection(); $this->customNotation = new ArrayCollection(); $this->educationNotationCriteriaConfigs = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getOrganization(): ?Organization { return $this->organization; } public function setOrganization(?Organization $organization): self { $this->organization = $organization; return $this; } /** * @return Collection */ public function getEducationNotations(): Collection { return $this->educationNotations; } public function addEducationNotation(EducationNotation $educationNotation): self { if (!$this->educationNotations->contains($educationNotation)) { $this->educationNotations[] = $educationNotation; $educationNotation->setCriteriaNotation($this); } return $this; } public function removeEducationNotation(EducationNotation $educationNotation): self { if ($this->educationNotations->removeElement($educationNotation)) { // set the owning side to null (unless already changed) if ($educationNotation->getCriteriaNotation() === $this) { $educationNotation->setCriteriaNotation(null); } } return $this; } /** * @return Collection */ public function getCustomNotation(): Collection { return $this->customNotation; } public function addCustomNotation(CustomNotation $customNotation): self { if (!$this->customNotation->contains($customNotation)) { $this->customNotation[] = $customNotation; $customNotation->setCriteriaNotation($this); } return $this; } public function removeCustomNotation(CustomNotation $customNotation): self { if ($this->customNotation->removeElement($customNotation)) { // set the owning side to null (unless already changed) if ($customNotation->getCriteriaNotation() === $this) { $customNotation->setCriteriaNotation(null); } } return $this; } /** * @return Collection */ public function getEducationNotationCriteriaConfigs(): Collection { return $this->educationNotationCriteriaConfigs; } public function addEducationNotationCriteriaConfig(EducationNotationCriteriaConfig $educationNotationCriteriaConfig): self { if (!$this->educationNotationCriteriaConfigs->contains($educationNotationCriteriaConfig)) { $this->educationNotationCriteriaConfigs[] = $educationNotationCriteriaConfig; $educationNotationCriteriaConfig->setCriteriaNotation($this); } return $this; } public function removeEducationNotationCriteriaConfig(EducationNotationCriteriaConfig $educationNotationCriteriaConfig): self { if ($this->educationNotationCriteriaConfigs->removeElement($educationNotationCriteriaConfig)) { // set the owning side to null (unless already changed) if ($educationNotationCriteriaConfig->getCriteriaNotation() === $this) { $educationNotationCriteriaConfig->setCriteriaNotation(null); } } return $this; } public function getType(): ?TypeCriteriaEnum { return $this->type; } public function setType(TypeCriteriaEnum $type): self { $this->type = $type; return $this; } public function getNoteMax(): ?int { return $this->noteMax; } public function setNoteMax(int $noteMax): self { $this->noteMax = $noteMax; return $this; } }