<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\QuotationRepository")
*/
class Quotation
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
* @Assert\NotBlank
*/
private $company;
/**
* @ORM\Column(type="string", length=255)
* @Assert\NotBlank
*/
private $firstname;
/**
* @ORM\Column(type="string", length=255)
* @Assert\NotBlank
*/
private $lastname;
/**
* @ORM\Column(type="string", length=20)
* @Assert\Regex("/^(?:(?:\+|00)33[\s.-]{0,3}(?:\(0\)[\s.-]{0,3})?|0)[1-9](?:(?:[\s.-]?\d{2}){4}|\d{2}(?:[\s.-]?\d{3}){2})$/")
*/
private $phone;
/**
* @ORM\Column(type="string", length=255)
* @Assert\Email( message = "L'email '{{ value }}' n'est pas valide.")
*/
private $email;
/**
* @ORM\Column(type="text")
*
*/
private $message;
/**
* @ORM\Column(type="date")
*
*/
private $requestDate;
public function getId(): ?int
{
return $this->id;
}
public function getCompany(): ?string
{
return $this->company;
}
public function setCompany(string $company): self
{
$this->company = $company;
return $this;
}
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 getPhone(): ?string
{
return $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = $phone;
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 getRequestDate(): ?\DateTimeInterface
{
return $this->requestDate;
}
public function setRequestDate(\DateTimeInterface $requestDate): self
{
$this->requestDate = $requestDate;
return $this;
}
}