<?php
namespace App\Entity;
use App\Entity\SuperClass\BaseEntity;
use App\Repository\ContactUsRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=ContactUsRepository::class)
*/
class ContactUs extends BaseEntity
{
/**
* @ORM\Column(type="string", length=255)
* @Assert\NotBlank()
*/
private $name;
/**
* @ORM\Column(type="string", length=255)
* @Assert\NotBlank()
*/
private $email;
/**
* @ORM\Column(type="bigint")
* @Assert\NotBlank()
* @Assert\Length(
* min="9",
* max="10",
* minMessage="phone must be atleast {{ limit }} digits.",
* maxMessage="phone can't be grater than {{ limit }} digits."
* )
*/
private $phone;
/**
* @ORM\Column(type="string", length=255)
* @Assert\NotBlank()
*/
private $subject;
/**
* @ORM\Column(type="text")
* @Assert\NotBlank()
*/
private $message;
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
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 getSubject(): ?string
{
return $this->subject;
}
public function setSubject(string $subject): self
{
$this->subject = $subject;
return $this;
}
public function getMessage(): ?string
{
return $this->message;
}
public function setMessage(string $message): self
{
$this->message = $message;
return $this;
}
}