src/Entity/Message.php line 15

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MessageRepository;
  4. use Doctrine\DBAL\Types\Type;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Timestampable\Traits\TimestampableEntity;
  8. use Symfony\Component\Mime\Email;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. #[ORM\Entity(repositoryClassMessageRepository::class)]
  11. #[ORM\Table(name'`messages`')]
  12. class Message
  13. {
  14.     use TimestampableEntity;
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column]
  18.     private ?int $id null;
  19.     #[Assert\Length(max20)]
  20.     #[ORM\Column(length20)]
  21.     private ?string $name null;
  22.     #[Assert\Length(max100)]
  23.     #[ORM\Column(length100)]
  24.     private ?string $email null;
  25.     #[ORM\Column(typeTypes::TEXT)]
  26.     private ?string $body null;
  27.     #[ORM\Column]
  28.     private ?bool $is_read false;
  29.     #[ORM\Column]
  30.     private ?int $phone null;
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getName(): ?string
  36.     {
  37.         return $this->name;
  38.     }
  39.     public function setName(string $name): self
  40.     {
  41.         $this->name $name;
  42.         return $this;
  43.     }
  44.     public function getEmail(): ?string
  45.     {
  46.         return $this->email;
  47.     }
  48.     public function setEmail(string $email): self
  49.     {
  50.         $this->email $email;
  51.         return $this;
  52.     }
  53.     public function getBody(): ?string
  54.     {
  55.         return $this->body;
  56.     }
  57.     public function setBody(string $body): self
  58.     {
  59.         $this->body $body;
  60.         return $this;
  61.     }
  62.     public function getIsRead(): ?bool
  63.     {
  64.         return $this->is_read;
  65.     }
  66.     public function setIsRead(?bool $is_read): self
  67.     {
  68.         $this->is_read $is_read;
  69.         return $this;
  70.     }
  71.     public function getPhone(): ?int
  72.     {
  73.         return $this->phone;
  74.     }
  75.     public function setPhone(int $phone): self
  76.     {
  77.         $this->phone $phone;
  78.         return $this;
  79.     }
  80. }