<?phpnamespace App\Entity\Adherent;use App\Entity\Webfactory\Widget\Classique\Conviction;use App\Repository\Adherent\MagasinConvictionRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: MagasinConvictionRepository::class)]class MagasinConviction implements \Stringable{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\ManyToOne(targetEntity: Magasin::class, inversedBy: 'magasinConvictions')] #[ORM\JoinColumn(name: 'magasin', referencedColumnName: 'k_adherent', nullable: false)] private $k_adherent; #[ORM\Column(type: 'string', length: 255)] private $name; #[ORM\Column(type: 'text', nullable: true)] private $conviction; #[ORM\Column(type: 'boolean')] private $active; #[ORM\Column(type: 'datetime_immutable')] private $created_at; #[ORM\ManyToMany(targetEntity: PlateformDiffusion::class, inversedBy: 'magasinConvictions')] private $plateform; #[ORM\Column(name: 'lang', type: 'string')] private $lang; public function __construct() { $this->plateform = new ArrayCollection(); $this->created_at = new \DateTimeImmutable("now"); $this->verbatims = new ArrayCollection(); } public function __toString(): string{ return (string) $this->name; } public function getId(): ?int { return $this->id; } public function getKAdherent(): ?Magasin { return $this->k_adherent; } public function setKAdherent(?Magasin $k_adherent): self { $this->k_adherent = $k_adherent; return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getConviction(): ?string { return $this->conviction; } public function setConviction(?string $conviction): self { $this->conviction = $conviction; return $this; } public function getActive(): ?bool { return $this->active; } public function setActive(bool $active): self { $this->active = $active; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->created_at; } public function setCreatedAt(\DateTimeImmutable $created_at): self { $this->created_at = $created_at; return $this; } /** * @return Collection|PlateformDiffusion[] */ public function getPlateform(): Collection { return $this->plateform; } public function addPlateform(PlateformDiffusion $plateform): self { if (!$this->plateform->contains($plateform)) { $this->plateform[] = $plateform; } return $this; } public function removePlateform(PlateformDiffusion $plateform): self { $this->plateform->removeElement($plateform); return $this; } /** * @return mixed */ public function getLang() { return $this->lang; } public function setLang(mixed $lang): void { $this->lang = $lang; }}