OrganizationIdentification.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Organization;
  4. use ApiPlatform\Metadata\ApiResource;
  5. use ApiPlatform\Metadata\Get;
  6. use App\Repository\Organization\OrganizationIdentificationRepository;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9. * Cette entité regroupe les informations permettant d'identifier une organisation, et est utilisée entre autre
  10. * pour la création d'organisation.
  11. *
  12. * Fichier source de la view : ./sql/schema-extensions/003-view_organization_identification.sql
  13. */
  14. #[ApiResource(
  15. operations: [
  16. new Get(
  17. uriTemplate: '/public/organization_identification/{id}',
  18. requirements: ['id' => '\\d+']
  19. ),
  20. ]
  21. )]
  22. #[ORM\Table(name: 'view_organization_identification')]
  23. #[ORM\Entity(repositoryClass: OrganizationIdentificationRepository::class, readOnly: true)]
  24. class OrganizationIdentification
  25. {
  26. #[ORM\Id]
  27. #[ORM\Column]
  28. private int $id;
  29. #[ORM\Column]
  30. private string $name;
  31. #[ORM\Column]
  32. private string $normalizedName;
  33. #[ORM\Column(nullable: true, options: ['default' => null])]
  34. private ?string $identifier = null;
  35. #[ORM\Column(nullable: true, options: ['default' => null])]
  36. private ?string $siretNumber = null;
  37. #[ORM\Column(nullable: true, options: ['default' => null])]
  38. private ?string $waldecNumber = null;
  39. #[ORM\Column(nullable: true, options: ['default' => null])]
  40. private ?string $normalizedAddress = null;
  41. #[ORM\Column(nullable: true, options: ['default' => null])]
  42. private ?string $streetAddress = null;
  43. #[ORM\Column(nullable: true, options: ['default' => null])]
  44. private ?string $streetAddressSecond = null;
  45. #[ORM\Column(nullable: true, options: ['default' => null])]
  46. private ?string $streetAddressThird = null;
  47. #[ORM\Column(nullable: true, options: ['default' => null])]
  48. private ?string $addressCity = null;
  49. #[ORM\Column(nullable: true, options: ['default' => null])]
  50. private ?string $postalCode = null;
  51. #[ORM\Column(nullable: true, options: ['default' => null])]
  52. private ?string $email = null;
  53. #[ORM\Column(nullable: true, options: ['default' => null])]
  54. private ?string $telphone = null;
  55. public function getId(): int
  56. {
  57. return $this->id;
  58. }
  59. public function setId(int $id): self
  60. {
  61. $this->id = $id;
  62. return $this;
  63. }
  64. public function getName(): string
  65. {
  66. return $this->name;
  67. }
  68. public function setName(string $name): self
  69. {
  70. $this->name = $name;
  71. return $this;
  72. }
  73. public function getNormalizedName(): string
  74. {
  75. return $this->normalizedName;
  76. }
  77. public function setNormalizedName(string $normalizedName): self
  78. {
  79. $this->normalizedName = $normalizedName;
  80. return $this;
  81. }
  82. public function getIdentifier(): ?string
  83. {
  84. return $this->identifier;
  85. }
  86. public function setIdentifier(?string $identifier): self
  87. {
  88. $this->identifier = $identifier;
  89. return $this;
  90. }
  91. public function getSiretNumber(): ?string
  92. {
  93. return $this->siretNumber;
  94. }
  95. public function setSiretNumber(?string $siretNumber): self
  96. {
  97. $this->siretNumber = $siretNumber;
  98. return $this;
  99. }
  100. public function getWaldecNumber(): ?string
  101. {
  102. return $this->waldecNumber;
  103. }
  104. public function setWaldecNumber(?string $waldecNumber): self
  105. {
  106. $this->waldecNumber = $waldecNumber;
  107. return $this;
  108. }
  109. public function getNormalizedAddress(): ?string
  110. {
  111. return $this->normalizedAddress;
  112. }
  113. public function setNormalizedAddress(?string $normalizedAddress): self
  114. {
  115. $this->normalizedAddress = $normalizedAddress;
  116. return $this;
  117. }
  118. public function getAddressCity(): ?string
  119. {
  120. return $this->addressCity;
  121. }
  122. public function setAddressCity(?string $addressCity): self
  123. {
  124. $this->addressCity = $addressCity;
  125. return $this;
  126. }
  127. public function getPostalCode(): ?string
  128. {
  129. return $this->postalCode;
  130. }
  131. public function setPostalCode(?string $postalCode): self
  132. {
  133. $this->postalCode = $postalCode;
  134. return $this;
  135. }
  136. public function getEmail(): ?string
  137. {
  138. return $this->email;
  139. }
  140. public function setEmail(?string $email): self
  141. {
  142. $this->email = $email;
  143. return $this;
  144. }
  145. public function getTelphone(): ?string
  146. {
  147. return $this->telphone;
  148. }
  149. public function setTelphone(?string $telphone): self
  150. {
  151. $this->telphone = $telphone;
  152. return $this;
  153. }
  154. }