src/Entity/Message.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MessageRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassMessageRepository::class)]
  7. class Message
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length255)]
  14.     private ?string $Name null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $Email null;
  17.     #[ORM\Column(typeTypes::TEXT)]
  18.     private ?string $Content null;
  19.     #[ORM\Column]
  20.     private ?\DateTimeImmutable $createdAt null;
  21.     public function __construct()
  22.     {
  23.         $this->createdAt = new \DateTimeImmutable();
  24.     }
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getName(): ?string
  30.     {
  31.         return $this->Name;
  32.     }
  33.     public function setName(string $Name): self
  34.     {
  35.         $this->Name $Name;
  36.         return $this;
  37.     }
  38.     public function getEmail(): ?string
  39.     {
  40.         return $this->Email;
  41.     }
  42.     public function setEmail(string $Email): self
  43.     {
  44.         $this->Email $Email;
  45.         return $this;
  46.     }
  47.     public function getContent(): ?string
  48.     {
  49.         return $this->Content;
  50.     }
  51.     public function setContent(string $Content): self
  52.     {
  53.         $this->Content $Content;
  54.         return $this;
  55.     }
  56.     public function getCreatedAt(): ?\DateTimeImmutable
  57.     {
  58.         return $this->createdAt;
  59.     }
  60.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  61.     {
  62.         $this->createdAt $createdAt;
  63.         return $this;
  64.     }
  65. }