src/Entity/CRM/AwardLeague.php line 11
<?phpnamespace App\Entity\CRM;use App\Repository\AwardLeagueRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: AwardLeagueRepository::class)]class AwardLeague{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\Column(length: 255)]private ?string $color = null;#[ORM\OneToMany(mappedBy: 'awardLeague', targetEntity: Consultant::class)]private Collection $consultants;public function __construct(){$this->consultants = new ArrayCollection();}public function __toString(): string{return $this->name;}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): static{$this->name = $name;return $this;}public function getColor(): ?string{return $this->color;}public function setColor(string $color): static{$this->color = $color;return $this;}/*** @return Collection<int, Consultant>*/public function getConsultants(): Collection{return $this->consultants;}public function addConsultant(Consultant $consultant): static{if (!$this->consultants->contains($consultant)) {$this->consultants->add($consultant);$consultant->setAwardLeague($this);}return $this;}public function removeConsultant(Consultant $consultant): static{if ($this->consultants->removeElement($consultant)) {// set the owning side to null (unless already changed)if ($consultant->getAwardLeague() === $this) {$consultant->setAwardLeague(null);}}return $this;}}