<?phpnamespace App\Entity\Crm;use App\Entity\Adherent\Magasin;use App\Repository\Crm\CrmSettingsRepository;use Doctrine\ORM\Mapping as ORM;use Doctrine\ORM\Mapping\PrePersist;#[ORM\Entity(repositoryClass: CrmSettingsRepository::class)]#[ORM\hasLifecycleCallbacks]class CrmSettings{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column] private ?bool $activeIa = false; #[ORM\Column] private ?bool $autoPublish = false; #[ORM\Column(nullable: true)] private ?\DateTimeImmutable $createdAt = null; #[ORM\Column(nullable: true)] private ?\DateTimeImmutable $updatedAt = null; #[ORM\OneToOne(inversedBy: 'crmSettings', cascade: ['persist', 'remove'])] #[ORM\JoinColumn(name: 'magasin', referencedColumnName: 'k_adherent')] private ?Magasin $magasin = null; public function __construct() { $this->createdAt = new \DateTimeImmutable(); } #[ORM\PreUpdate] public function onPreUpdateEntity(): void { $this->updatedAt = new \DateTimeImmutable(); } public function getId(): ?int { return $this->id; } public function isActiveIa(): ?bool { return $this->activeIa; } public function setActiveIa(bool $activeIa): static { $this->activeIa = $activeIa; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } public function setCreatedAt(?\DateTimeImmutable $createdAt): static { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeImmutable { return $this->updatedAt; } public function setUpdatedAt(?\DateTimeImmutable $updatedAt): static { $this->updatedAt = $updatedAt; return $this; } public function getMagasin(): ?Magasin { return $this->magasin; } public function setMagasin(?Magasin $magasin): static { $this->magasin = $magasin; return $this; } public function getAutoPublish(): ?bool { return $this->autoPublish; } public function setAutoPublish(?bool $autoPublish): void { $this->autoPublish = $autoPublish; }}