Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
www.entreprise-traitement-humidite.fr
/
htdocs
/
src
/
Entity
/
/srv/data/web/vhosts/www.entreprise-traitement-humidite.fr/htdocs/src/Entity/Contact.php
<?php namespace App\Entity; use App\Repository\ContactRepository; use Symfony\Component\Validator\Constraints as Assert; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=ContactRepository::class) */ class Contact { /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) * @Assert\NotBlank(message="Le champ ne peut pas être vide!") */ private $firstname; /** * @ORM\Column(type="string", length=255) * @Assert\NotBlank(message="Le champ ne peut pas être vide!") */ private $lastname; /** * @ORM\Column(type="string", length=255) * @Assert\NotBlank(message="Le champ ne peut pas être vide!") */ private $email; /** * @ORM\Column(type="string", length=255) * @Assert\NotBlank(message="Le champ ne peut pas être vide!") * @Assert\Regex("/^(?:(?:\+|00)33|0)\s*[1-9](?:[\s.-]*\d{2}){4}$/") */ private $phone; /** * @ORM\Column(type="string", length=255) */ private $type; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $fonction; /** * @ORM\Column(type="text") * @Assert\NotBlank(message="Le message ne peut pas être vide!") * @Assert\Length(min=10) */ private $message; /** * @ORM\Column(type="date") */ private $createdAt; /** * @ORM\Column(type="date", nullable=true) */ private $updatedAt; public function __construct() { $this->createdAt = new \DateTime(); } public function getId(): ?int { return $this->id; } public function getFirstname(): ?string { return $this->firstname; } public function setFirstname(string $firstname): self { $this->firstname = $firstname; return $this; } public function getLastname(): ?string { return $this->lastname; } public function setLastname(string $lastname): self { $this->lastname = $lastname; return $this; } public function getEmail(): ?string { return $this->email; } public function setEmail(string $email): self { $this->email = $email; return $this; } public function getPhone(): ?string { return $this->phone; } public function setPhone(string $phone): self { $this->phone = $phone; return $this; } public function getType(): ?string { return $this->type; } public function setType(string $type): self { $this->type = $type; return $this; } public function getFonction(): ?string { return $this->fonction; } public function setFonction(?string $fonction): self { $this->fonction = $fonction; return $this; } public function getMessage(): ?string { return $this->message; } public function setMessage(string $message): self { $this->message = $message; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } }