OrganizationFunction.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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\Column(type="date")
  23. */
  24. private $startDate;
  25. /**
  26. * @ORM\Column(type="date", nullable=true)
  27. */
  28. private $endDate;
  29. /**
  30. * @ORM\Column(type="string", length=255, nullable=true)
  31. */
  32. private $functionComplement;
  33. public function getId(): ?int
  34. {
  35. return $this->id;
  36. }
  37. public function getStartDate(): ?\DateTimeInterface
  38. {
  39. return $this->startDate;
  40. }
  41. public function setStartDate(\DateTimeInterface $startDate): self
  42. {
  43. $this->startDate = $startDate;
  44. return $this;
  45. }
  46. public function getEndDate(): ?\DateTimeInterface
  47. {
  48. return $this->endDate;
  49. }
  50. public function setEndDate(?\DateTimeInterface $endDate): self
  51. {
  52. $this->endDate = $endDate;
  53. return $this;
  54. }
  55. public function getFunctionComplement(): ?string
  56. {
  57. return $this->functionComplement;
  58. }
  59. public function setFunctionComplement(?string $functionComplement): self
  60. {
  61. $this->functionComplement = $functionComplement;
  62. return $this;
  63. }
  64. }