<?phpnamespace App\Entity;use App\Repository\RgpdContactRepository;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: RgpdContactRepository::class)]class RgpdContact{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\Column(type: 'string', length: 255)] private $name; #[ORM\Column(type: 'string', length: 20)] private $phone; #[ORM\Column(type: 'string', length: 255)] private $email; #[ORM\Column(type: 'datetime',options:['default'=> 'CURRENT_TIMESTAMP'])] private $createdAt; #[ORM\Column(type: 'datetime',options:['default'=> 'CURRENT_TIMESTAMP'])] private $updatedAt; #[ORM\ManyToOne(targetEntity: AccountingFirm::class, inversedBy: 'rgpdContacts')] #[ORM\JoinColumn(nullable: false)] private $AccountingFirm; 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 getPhone(): ?string { return $this->phone; } public function setPhone(string $phone): self { $this->phone = $phone; return $this; } public function getEmail(): ?string { return $this->email; } public function setEmail(string $email): self { $this->email = $email; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } #[ORM\PrePersist] #[ORM\PreUpdate] public function updateTimestamps() { if ($this->getCreatedAt()===null) { $this->setCreatedAt(new \DateTimeImmutable); } $this->setUpdatedAt(new \DateTimeImmutable); } public function getAccountingFirm(): ?AccountingFirm { return $this->AccountingFirm; } public function setAccountingFirm(?AccountingFirm $AccountingFirm): self { $this->AccountingFirm = $AccountingFirm; return $this; }}