src/Entity/ContactEbookDecMotiv.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\Timestampable;
  4. use App\Repository\ContactEbookDecMotivRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. #[ORM\Entity(repositoryClassContactEbookDecMotivRepository::class)]
  8. #[UniqueEntity(fields: ['email'], message'Votre demande est déjà enregistré')]
  9. class ContactEbookDecMotiv
  10. {
  11.     use Timestampable;
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column(type'integer')]
  15.     private $id;
  16.     #[ORM\Column(type'string'length255)]
  17.     private $name;
  18.     #[ORM\Column(type'string'length255)]
  19.     private $phone;
  20.     #[ORM\Column(type'string'length255)]
  21.     private $email;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     public function getName(): ?string
  27.     {
  28.         return $this->name;
  29.     }
  30.     public function setName(string $name): self
  31.     {
  32.         $this->name $name;
  33.         return $this;
  34.     }
  35.     public function getPhone(): ?string
  36.     {
  37.         return $this->phone;
  38.     }
  39.     public function setPhone(string $phone): self
  40.     {
  41.         $this->phone $phone;
  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. }