src/Entity/Adherent/Complement.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Adherent;
  3. use App\Repository\Adherent\ComplementRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassComplementRepository::class)]
  7. class Complement implements \Stringable
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length255)]
  14.     private $name;
  15.     #[ORM\Column(type'string'length255)]
  16.     private $type;
  17.     #[ORM\Column(type'string'length255nullabletrue)]
  18.     private $svg;
  19.     /**
  20.      * @var Magasin[]
  21.      */
  22.     #[ORM\ManyToMany(targetEntityMagasin::class, mappedBy'complements')]
  23.     private $magasins;
  24.     public function __construct()
  25.     {
  26.         $this->magasins = new ArrayCollection();
  27.     }
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getName(): ?string
  33.     {
  34.         return $this->name;
  35.     }
  36.     public function setName(string $name): self
  37.     {
  38.         $this->name $name;
  39.         return $this;
  40.     }
  41.     public function getType(): ?string
  42.     {
  43.         return $this->type;
  44.     }
  45.     public function setType(string $type): self
  46.     {
  47.         $this->type $type;
  48.         return $this;
  49.     }
  50.     /**
  51.      * @return mixed
  52.      */
  53.     public function getSvg()
  54.     {
  55.         return $this->svg;
  56.     }
  57.     /**
  58.      * @param mixed $svg
  59.      */
  60.     public function setSvg($svg): void
  61.     {
  62.         $this->svg $svg;
  63.     }
  64.     public function __toString(): string
  65.     {
  66.         return (string) $this->name;
  67.     }
  68. }