<?php
namespace App\Entity;
use App\Repository\SocialLinkRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: SocialLinkRepository::class)]
class SocialLink
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $name = null;
#[ORM\Column(length: 255)]
private ?string $url = null;
#[ORM\ManyToOne(inversedBy: 'socialLinks')]
private ?Rapper $rapper = null;
public function __toString()
{
return (string)$this->getName();
}
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 getUrl(): ?string
{
return $this->url;
}
public function setUrl(string $url): static
{
$this->url = $url;
return $this;
}
public function getRapper(): ?Rapper
{
return $this->rapper;
}
public function setRapper(?Rapper $rapper): static
{
$this->rapper = $rapper;
return $this;
}
}