src/Entity/CjecContact.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. #[ORM\Entity]
  6. #[ORM\Table(name"cjec_contact")]
  7. #[ORM\HasLifecycleCallbacks]
  8. class CjecContact
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private ?int $id null;
  14.     #[ORM\Column(type'string'length255)]
  15.     private string $name;
  16.     #[ORM\Column(type'string'length255)]
  17.     private string $telephone;
  18.     #[ORM\Column(type'string'length255)]
  19.     private string $email;
  20.     #[ORM\Column(type'text'nullabletrue)]
  21.     private ?string $message null;
  22.     #[ORM\Column(type'string'length255nullabletrue)]
  23.     private ?string $page null;
  24.     #[ORM\Column(type'datetime_immutable'nullabletrue)]
  25.     private ?\DateTimeImmutable $createdAt null;
  26.     #[ORM\PrePersist]
  27.     public function updateTimestamps(): void
  28.     {
  29.         $this->createdAt = new \DateTimeImmutable();
  30.     }
  31.     public function getId(): ?int { return $this->id; }
  32.     public function getName(): string { return $this->name; }
  33.     public function setName(string $name): self $this->name $name; return $this; }
  34.     public function getTelephone(): string { return $this->telephone; }
  35.     public function setTelephone(string $telephone): self $this->telephone $telephone; return $this; }
  36.     public function getEmail(): string { return $this->email; }
  37.     public function setEmail(string $email): self $this->email $email; return $this; }
  38.     public function getMessage(): ?string { return $this->message; }
  39.     public function setMessage(?string $message): self $this->message $message; return $this; }
  40.     public function getPage(): ?string { return $this->page; }
  41.     public function setPage(?string $page): self $this->page $page; return $this; }
  42.     public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; }
  43. }