<?php
namespace App\Entity\Adherent;
use App\Repository\Adherent\ComplementRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ComplementRepository::class)]
class Complement implements \Stringable
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private $name;
#[ORM\Column(type: 'string', length: 255)]
private $type;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $svg;
/**
* @var Magasin[]
*/
#[ORM\ManyToMany(targetEntity: Magasin::class, mappedBy: 'complements')]
private $magasins;
public function __construct()
{
$this->magasins = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
/**
* @return mixed
*/
public function getSvg()
{
return $this->svg;
}
/**
* @param mixed $svg
*/
public function setSvg($svg): void
{
$this->svg = $svg;
}
public function __toString(): string
{
return (string) $this->name;
}
}