src/Entity/Contact.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContactRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassContactRepository::class)]
  7. class Contact
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length50nullabletrue)]
  14.     private ?string $firstname null;
  15.     #[ORM\Column(length50nullabletrue)]
  16.     private ?string $lastname null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $email null;
  19.     #[ORM\Column(length100nullabletrue)]
  20.     private ?string $subject null;
  21.     #[ORM\Column(typeTypes::TEXT)]
  22.     private ?string $message null;
  23.     #[ORM\Column]
  24.     private ?\DateTimeImmutable $createdAt null;
  25.     public function __construct()
  26.     {
  27.         $this->createdAt = new \DateTimeImmutable();
  28.     }
  29.     public function getId(): ?int
  30.     {
  31.         return $this->id;
  32.     }
  33.     public function getFirstname(): ?string
  34.     {
  35.         return $this->firstname;
  36.     }
  37.     public function setFirstname(?string $firstname): self
  38.     {
  39.         $this->firstname $firstname;
  40.         return $this;
  41.     }
  42.     public function getLastname(): ?string
  43.     {
  44.         return $this->lastname;
  45.     }
  46.     public function setLastname(?string $lastname): self
  47.     {
  48.         $this->lastname $lastname;
  49.         return $this;
  50.     }
  51.     public function getEmail(): ?string
  52.     {
  53.         return $this->email;
  54.     }
  55.     public function setEmail(string $email): self
  56.     {
  57.         $this->email $email;
  58.         return $this;
  59.     }
  60.     public function getSubject(): ?string
  61.     {
  62.         return $this->subject;
  63.     }
  64.     public function setSubject(?string $subject): self
  65.     {
  66.         $this->subject $subject;
  67.         return $this;
  68.     }
  69.     public function getMessage(): ?string
  70.     {
  71.         return $this->message;
  72.     }
  73.     public function setMessage(string $message): self
  74.     {
  75.         $this->message $message;
  76.         return $this;
  77.     }
  78.     public function getCreatedAt(): ?\DateTimeImmutable
  79.     {
  80.         return $this->createdAt;
  81.     }
  82.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  83.     {
  84.         $this->createdAt $createdAt;
  85.         return $this;
  86.     }
  87. }