HelloAsso.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. namespace App\Entity\Organization;
  3. use App\Entity\Traits\CreatedOnAndByTrait;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7. * HelloAsso entity for storing HelloAsso connection information
  8. *
  9. * @see https://dev.helloasso.com/docs/mire-authorisation
  10. */
  11. #[ORM\Entity]
  12. #[ORM\Table]
  13. class HelloAsso
  14. {
  15. use CreatedOnAndByTrait;
  16. #[ORM\Id]
  17. #[ORM\Column]
  18. #[ORM\GeneratedValue]
  19. private ?int $id = null;
  20. #[ORM\OneToOne(targetEntity: Organization::class, inversedBy: "helloAsso")]
  21. #[ORM\JoinColumn(name: "organization_id", referencedColumnName: "id", nullable: false)]
  22. private Organization $organization;
  23. #[ORM\Column(type: "text", nullable: true)]
  24. private ?string $token = null;
  25. #[ORM\Column(type: "text", nullable: true)]
  26. private ?string $refreshToken = null;
  27. #[ORM\Column(type: "string", length: 255, nullable: true)]
  28. private ?string $organizationSlug = null;
  29. public function getId(): ?int
  30. {
  31. return $this->id;
  32. }
  33. public function setId(?int $id): self
  34. {
  35. $this->id = $id;
  36. return $this;
  37. }
  38. public function getOrganization(): Organization
  39. {
  40. return $this->organization;
  41. }
  42. public function setOrganization(Organization $organization): self
  43. {
  44. $this->organization = $organization;
  45. return $this;
  46. }
  47. public function getToken(): ?string
  48. {
  49. return $this->token;
  50. }
  51. public function setToken(?string $token): self
  52. {
  53. $this->token = $token;
  54. return $this;
  55. }
  56. public function getRefreshToken(): ?string
  57. {
  58. return $this->refreshToken;
  59. }
  60. public function setRefreshToken(?string $refreshToken): self
  61. {
  62. $this->refreshToken = $refreshToken;
  63. return $this;
  64. }
  65. public function getOrganizationSlug(): ?string
  66. {
  67. return $this->organizationSlug;
  68. }
  69. public function setOrganizationSlug(?string $organizationSlug): self
  70. {
  71. $this->organizationSlug = $organizationSlug;
  72. return $this;
  73. }
  74. }