<?php
namespace App\Entity;
use App\Repository\StakeholderSubscriptionTypeRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: StakeholderSubscriptionTypeRepository::class)]
#[ORM\UniqueConstraint(name: 'uniq_subscription_type_slug', columns: ['slug'])]
class StakeholderSubscriptionType
{
public const NEWSLETTER = 'newsletter';
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private ?int $id = null;
#[ORM\Column(type: 'string', length: 255)]
private string $label;
#[ORM\Column(type: 'string', length: 50)]
private string $slug;
public function getId(): ?int
{
return $this->id;
}
public function __toString(): string
{
return $this->label;
}
public function getLabel(): string
{
return $this->label;
}
public function setLabel(string $label): self
{
$this->label = $label;
return $this;
}
public function getSlug(): string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = strtolower($slug);
return $this;
}
}