src/Entity/GroupTicket/ContactInformation.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\GroupTicket;
  3. use App\Entity\Abstract\Entity;
  4. use App\Repository\GroupTicket\ContactInformationRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClass: ContactInformationRepository::class)]
  8. #[ORM\Table(name: 'group_tickets_contact_information')]
  9. class ContactInformation extends Entity
  10. {
  11. #[ORM\Id]
  12. #[ORM\GeneratedValue]
  13. #[ORM\Column]
  14. private ?int $id = null;
  15. #[ORM\Column(length: 255, nullable: true)]
  16. private ?string $name = null;
  17. #[ORM\Column(length: 255, nullable: true)]
  18. private ?string $email = null;
  19. #[ORM\Column(length: 32, nullable: true)]
  20. private ?string $phone = null;
  21. #[ORM\Column(type: Types::TEXT, nullable: true)]
  22. private ?string $adress = null;
  23. #[ORM\Column(type: Types::TEXT, nullable: true)]
  24. private ?string $remark = null;
  25. #[ORM\OneToOne(mappedBy: 'contactInformation')]
  26. private ?School $school = null;
  27. public function getId(): ?int
  28. {
  29. return $this->id;
  30. }
  31. public function getName(): ?string
  32. {
  33. return $this->name;
  34. }
  35. public function setName(?string $name): static
  36. {
  37. $this->name = $name;
  38. return $this;
  39. }
  40. public function getEmail(): ?string
  41. {
  42. return $this->email;
  43. }
  44. public function setEmail(?string $email): static
  45. {
  46. $this->email = $email;
  47. return $this;
  48. }
  49. public function getPhone(): ?string
  50. {
  51. return $this->phone;
  52. }
  53. public function setPhone(?string $phone): static
  54. {
  55. $this->phone = $phone;
  56. return $this;
  57. }
  58. public function getAdress(): ?string
  59. {
  60. return $this->adress;
  61. }
  62. public function setAdress(?string $adress): static
  63. {
  64. $this->adress = $adress;
  65. return $this;
  66. }
  67. public function getRemark(): ?string
  68. {
  69. return $this->remark;
  70. }
  71. public function setRemark(?string $remark): static
  72. {
  73. $this->remark = $remark;
  74. return $this;
  75. }
  76. public function getSchool(): ?School
  77. {
  78. return $this->school;
  79. }
  80. public function setSchool(?School $school): static
  81. {
  82. // unset the owning side of the relation if necessary
  83. if ($school === null && $this->school !== null) {
  84. $this->school->setContactInformation(null);
  85. }
  86. // set the owning side of the relation if necessary
  87. if ($school !== null && $school->getContactInformation() !== $this) {
  88. $school->setContactInformation($this);
  89. }
  90. $this->school = $school;
  91. return $this;
  92. }
  93. }