OrganizationLicence.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. namespace App\Entity\Organization;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Entity\Access\Access;
  5. use App\Repository\Organization\OrganizationLicenceRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ApiResource()
  9. * @ORM\Entity(repositoryClass=OrganizationLicenceRepository::class)
  10. */
  11. class OrganizationLicence
  12. {
  13. /**
  14. * @ORM\Id
  15. * @ORM\GeneratedValue
  16. * @ORM\Column(type="integer")
  17. */
  18. private $id;
  19. /**
  20. * @ORM\ManyToOne(targetEntity=Organization::class, inversedBy="organizationLicences")
  21. * @ORM\JoinColumn(nullable=false)
  22. */
  23. private $organization;
  24. /**
  25. * @ORM\ManyToOne(targetEntity=Access::class, inversedBy="organizationLicences")
  26. * @ORM\JoinColumn(nullable=false)
  27. */
  28. private $licensee;
  29. /**
  30. * @ORM\Column(type="string", length=255, nullable=true)
  31. */
  32. private $licenceNumber;
  33. /**
  34. * @ORM\Column(type="string", length=255, nullable=true)
  35. */
  36. private $categorie;
  37. /**
  38. * @ORM\Column(type="date", nullable=true)
  39. */
  40. private $validityDate;
  41. public function getId(): ?int
  42. {
  43. return $this->id;
  44. }
  45. public function getOrganization(): ?Organization
  46. {
  47. return $this->organization;
  48. }
  49. public function setOrganization(?Organization $organization): self
  50. {
  51. $this->organization = $organization;
  52. return $this;
  53. }
  54. public function getLicensee(): ?Access
  55. {
  56. return $this->licensee;
  57. }
  58. public function setLicensee(?Access $licensee): self
  59. {
  60. $this->licensee = $licensee;
  61. return $this;
  62. }
  63. public function getLicenceNumber(): ?string
  64. {
  65. return $this->licenceNumber;
  66. }
  67. public function setLicenceNumber(?string $licenceNumber): self
  68. {
  69. $this->licenceNumber = $licenceNumber;
  70. return $this;
  71. }
  72. public function getCategorie(): ?string
  73. {
  74. return $this->categorie;
  75. }
  76. public function setCategorie(?string $categorie): self
  77. {
  78. $this->categorie = $categorie;
  79. return $this;
  80. }
  81. public function getValidityDate(): ?\DateTimeInterface
  82. {
  83. return $this->validityDate;
  84. }
  85. public function setValidityDate(?\DateTimeInterface $validityDate): self
  86. {
  87. $this->validityDate = $validityDate;
  88. return $this;
  89. }
  90. }