src/Entity/ContactUs.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\SuperClass\BaseEntity;
  4. use App\Repository\ContactUsRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8. * @ORM\Entity(repositoryClass=ContactUsRepository::class)
  9. */
  10. class ContactUs extends BaseEntity
  11. {
  12. /**
  13. * @ORM\Column(type="string", length=255)
  14. * @Assert\NotBlank()
  15. */
  16. private $name;
  17. /**
  18. * @ORM\Column(type="string", length=255)
  19. * @Assert\NotBlank()
  20. */
  21. private $email;
  22. /**
  23. * @ORM\Column(type="bigint")
  24. * @Assert\NotBlank()
  25. * @Assert\Length(
  26. * min="9",
  27. * max="10",
  28. * minMessage="phone must be atleast {{ limit }} digits.",
  29. * maxMessage="phone can't be grater than {{ limit }} digits."
  30. * )
  31. */
  32. private $phone;
  33. /**
  34. * @ORM\Column(type="string", length=255)
  35. * @Assert\NotBlank()
  36. */
  37. private $subject;
  38. /**
  39. * @ORM\Column(type="text")
  40. * @Assert\NotBlank()
  41. */
  42. private $message;
  43. public function getName(): ?string
  44. {
  45. return $this->name;
  46. }
  47. public function setName(string $name): self
  48. {
  49. $this->name = $name;
  50. return $this;
  51. }
  52. public function getEmail(): ?string
  53. {
  54. return $this->email;
  55. }
  56. public function setEmail(string $email): self
  57. {
  58. $this->email = $email;
  59. return $this;
  60. }
  61. public function getPhone(): ?string
  62. {
  63. return $this->phone;
  64. }
  65. public function setPhone(string $phone): self
  66. {
  67. $this->phone = $phone;
  68. return $this;
  69. }
  70. public function getSubject(): ?string
  71. {
  72. return $this->subject;
  73. }
  74. public function setSubject(string $subject): self
  75. {
  76. $this->subject = $subject;
  77. return $this;
  78. }
  79. public function getMessage(): ?string
  80. {
  81. return $this->message;
  82. }
  83. public function setMessage(string $message): self
  84. {
  85. $this->message = $message;
  86. return $this;
  87. }
  88. }