src/Entity/Audit.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\Timestampable;
  4. use App\Repository\AuditRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. #[ORM\Entity(repositoryClassAuditRepository::class)]
  8. #[ORM\Table(name"audits")]
  9. #[ORM\HasLifecycleCallbacks]
  10. class Audit
  11. {
  12.     use Timestampable;
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column(type'integer')]
  16.     private $id;
  17.     #[ORM\Column(type'string'length255)]
  18.     #[Assert\NotBlank(message'Veuillez entrer votre nom.')]
  19.     #[Assert\Length(min3,minMessage:'3 caractéres au minimum' )]
  20.     private $name;
  21.     #[ORM\Column(type'string'length255)]
  22.     #[Assert\NotBlank(message'Veuillez entrer un numero de telephone.')]
  23.     #[Assert\Length(min10,minMessage:'Veuillez entrer un numero de telephone valide' )]
  24.     private $telephone;
  25.     #[ORM\Column(type'string'length255)]
  26.     #[Assert\NotBlank(message'Veuillez entrer une adresse mail.')]
  27.     #[Assert\Email(message'Votre adresse mail n est pas valide')]
  28.     private $email;
  29.     #[ORM\Column(type'text')]
  30.     #[Assert\NotBlank(message'Veuillez entrer un message.')]
  31.     #[Assert\Length(min10,minMessage:'10 caractéres au minimum' )]
  32.     private $message;
  33.     #[ORM\Column(type'string'length255nullabletrue)]
  34.     private $page;
  35.     #[ORM\Column(type'string'length255nullabletrue)]
  36.     private $afid;
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getName(): ?string
  42.     {
  43.         return $this->name;
  44.     }
  45.     public function setName(string $name): self
  46.     {
  47.         $this->name $name;
  48.         return $this;
  49.     }
  50.     public function getTelephone(): ?string
  51.     {
  52.         return $this->telephone;
  53.     }
  54.     public function setTelephone(string $telephone): self
  55.     {
  56.         $this->telephone $telephone;
  57.         return $this;
  58.     }
  59.     public function getEmail(): ?string
  60.     {
  61.         return $this->email;
  62.     }
  63.     public function setEmail(string $email): self
  64.     {
  65.         $this->email $email;
  66.         return $this;
  67.     }
  68.     public function getMessage(): ?string
  69.     {
  70.         return $this->message;
  71.     }
  72.     public function setMessage(string $message): self
  73.     {
  74.         $this->message $message;
  75.         return $this;
  76.     }
  77.     public function getPage(): ?string
  78.     {
  79.         return $this->page;
  80.     }
  81.     public function setPage(?string $page): self
  82.     {
  83.         $this->page $page;
  84.         return $this;
  85.     }
  86.     public function getAfid(): ?string
  87.     {
  88.         return $this->afid;
  89.     }
  90.     public function setAfid(?string $afid): self
  91.     {
  92.         $this->afid $afid;
  93.         return $this;
  94.     }
  95. }