OrganizationFunction.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Access;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use App\Repository\Access\OrganizationFunctionRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * Fonction d'un Access dans une Organization sur une période donnée
  9. *
  10. * @ApiResource()
  11. * @ORM\Entity(repositoryClass=OrganizationFunctionRepository::class)
  12. */
  13. class OrganizationFunction
  14. {
  15. /**
  16. * @ORM\Id
  17. * @ORM\GeneratedValue
  18. * @ORM\Column(type="integer")
  19. */
  20. private $id;
  21. /**
  22. * @ORM\ManyToOne(targetEntity=Access::class, inversedBy="personActivity")
  23. */
  24. private $access;
  25. /**
  26. * @ORM\Column(type="date")
  27. */
  28. private $startDate;
  29. /**
  30. * @ORM\Column(type="date", nullable=true)
  31. */
  32. private $endDate;
  33. /**
  34. * @ORM\Column(type="string", length=255, nullable=true)
  35. */
  36. private $functionComplement;
  37. public function getId(): ?int
  38. {
  39. return $this->id;
  40. }
  41. public function getAccess(): ?Access
  42. {
  43. return $this->access;
  44. }
  45. public function setAccess(?Access $access): self
  46. {
  47. $this->access = $access;
  48. return $this;
  49. }
  50. public function getStartDate(): ?\DateTimeInterface
  51. {
  52. return $this->startDate;
  53. }
  54. public function setStartDate(\DateTimeInterface $startDate): self
  55. {
  56. $this->startDate = $startDate;
  57. return $this;
  58. }
  59. public function getEndDate(): ?\DateTimeInterface
  60. {
  61. return $this->endDate;
  62. }
  63. public function setEndDate(?\DateTimeInterface $endDate): self
  64. {
  65. $this->endDate = $endDate;
  66. return $this;
  67. }
  68. public function getFunctionComplement(): ?string
  69. {
  70. return $this->functionComplement;
  71. }
  72. public function setFunctionComplement(?string $functionComplement): self
  73. {
  74. $this->functionComplement = $functionComplement;
  75. return $this;
  76. }
  77. }