vendor/roothirsch/core-bundle/Entity/ContactValidation.php line 15

Open in your IDE?
  1. <?php
  2. namespace Roothirsch\CoreBundle\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8. * @ORM\Entity(repositoryClass="Roothirsch\CoreBundle\Repository\ContactValidationRepository")
  9. * @ORM\Table(name="contact_validation")
  10. * @ApiResource
  11. */
  12. class ContactValidation
  13. {
  14. /**
  15. * @ORM\Id
  16. * @ORM\GeneratedValue
  17. * @ORM\Column(type="integer")
  18. */
  19. private $id;
  20. /**
  21. * @ORM\Column(type="string")
  22. * @Assert\NotBlank(message="blank")
  23. * @Groups({"read", "write"})
  24. */
  25. private $name;
  26. /**
  27. * @ORM\Column(type="string", nullable=true)
  28. * @Groups({"read", "write"})
  29. */
  30. private $taxId;
  31. /**
  32. * @var Address
  33. * @ORM\OneToOne(targetEntity="Address", cascade={"persist"}, fetch="EAGER")
  34. * @Groups({"read", "write"})
  35. */
  36. private $address;
  37. /**
  38. * @var User
  39. * @ORM\OneToOne(targetEntity="User", inversedBy="contactValidation", cascade={"persist"}, fetch="EAGER")
  40. * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  41. */
  42. private $user;
  43. /**
  44. * @var bool
  45. * @ORM\Column(type="boolean")
  46. */
  47. private $verified = false;
  48. /**
  49. * @return mixed
  50. */
  51. public function getId()
  52. {
  53. return $this->id;
  54. }
  55. /**
  56. * @param mixed $id
  57. */
  58. public function setId($id)
  59. {
  60. $this->id = $id;
  61. }
  62. /**
  63. * @return mixed
  64. */
  65. public function getName()
  66. {
  67. return $this->name;
  68. }
  69. /**
  70. * @param mixed $name
  71. */
  72. public function setName($name)
  73. {
  74. $this->name = $name;
  75. }
  76. /**
  77. * @return mixed
  78. */
  79. public function getTaxId()
  80. {
  81. return $this->taxId;
  82. }
  83. /**
  84. * @param mixed $taxId
  85. */
  86. public function setTaxId($taxId)
  87. {
  88. $this->taxId = $taxId;
  89. }
  90. /**
  91. * @return Address
  92. */
  93. public function getAddress()
  94. {
  95. return $this->address;
  96. }
  97. /**
  98. * @param Address $address
  99. */
  100. public function setAddress($address)
  101. {
  102. $this->address = $address;
  103. }
  104. /**
  105. * @return User
  106. */
  107. public function getUser()
  108. {
  109. return $this->user;
  110. }
  111. /**
  112. * @param User $user
  113. */
  114. public function setUser($user)
  115. {
  116. $this->user = $user;
  117. }
  118. /**
  119. * @return bool
  120. */
  121. public function isVerified()
  122. {
  123. return $this->verified;
  124. }
  125. /**
  126. * @param bool $verified
  127. */
  128. public function setVerified($verified)
  129. {
  130. $this->verified = $verified;
  131. }
  132. }