<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity]
#[ORM\Table(name: "cjec_contact")]
#[ORM\HasLifecycleCallbacks]
class CjecContact
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private ?int $id = null;
#[ORM\Column(type: 'string', length: 255)]
private string $name;
#[ORM\Column(type: 'string', length: 255)]
private string $telephone;
#[ORM\Column(type: 'string', length: 255)]
private string $email;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $message = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $page = null;
#[ORM\Column(type: 'datetime_immutable', nullable: true)]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\PrePersist]
public function updateTimestamps(): void
{
$this->createdAt = new \DateTimeImmutable();
}
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 getTelephone(): string { return $this->telephone; }
public function setTelephone(string $telephone): self { $this->telephone = $telephone; return $this; }
public function getEmail(): string { return $this->email; }
public function setEmail(string $email): self { $this->email = $email; return $this; }
public function getMessage(): ?string { return $this->message; }
public function setMessage(?string $message): self { $this->message = $message; return $this; }
public function getPage(): ?string { return $this->page; }
public function setPage(?string $page): self { $this->page = $page; return $this; }
public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; }
}