<?php
namespace App\Entity;
use App\Entity\Traits\Timestampable;
use App\Repository\AuditRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: AuditRepository::class)]
#[ORM\Table(name: "audits")]
#[ORM\HasLifecycleCallbacks]
class Audit
{
use Timestampable;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
#[Assert\NotBlank(message: 'Veuillez entrer votre nom.')]
#[Assert\Length(min: 3,minMessage:'3 caractéres au minimum' )]
private $name;
#[ORM\Column(type: 'string', length: 255)]
#[Assert\NotBlank(message: 'Veuillez entrer un numero de telephone.')]
#[Assert\Length(min: 10,minMessage:'Veuillez entrer un numero de telephone valide' )]
private $telephone;
#[ORM\Column(type: 'string', length: 255)]
#[Assert\NotBlank(message: 'Veuillez entrer une adresse mail.')]
#[Assert\Email(message: 'Votre adresse mail n est pas valide')]
private $email;
#[ORM\Column(type: 'text')]
#[Assert\NotBlank(message: 'Veuillez entrer un message.')]
#[Assert\Length(min: 10,minMessage:'10 caractéres au minimum' )]
private $message;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $page;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $afid;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getTelephone(): ?string
{
return $this->telephone;
}
public function setTelephone(string $telephone): self
{
$this->telephone = $telephone;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getMessage(): ?string
{
return $this->message;
}
public function setMessage(string $message): self
{
$this->message = $message;
return $this;
}
public function getPage(): ?string
{
return $this->page;
}
public function setPage(?string $page): self
{
$this->page = $page;
return $this;
}
public function getAfid(): ?string
{
return $this->afid;
}
public function setAfid(?string $afid): self
{
$this->afid = $afid;
return $this;
}
}