AttendanceBooking.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Booking;
  4. use ApiPlatform\Metadata\ApiResource;
  5. use App\Entity\Access\Access;
  6. // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9. * Représente l'absence d'un Access à un type de Booking et à une date précise.
  10. */
  11. #[ApiResource(operations: [])]
  12. // #[Auditable]
  13. #[ORM\Entity]
  14. class AttendanceBooking
  15. {
  16. #[ORM\Id]
  17. #[ORM\Column]
  18. #[ORM\GeneratedValue]
  19. private ?int $id = null;
  20. #[ORM\ManyToOne(inversedBy: 'attendanceBookings')]
  21. #[ORM\JoinColumn(nullable: true)]
  22. private ?Access $access = null;
  23. #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
  24. #[ORM\JoinColumn(nullable: true)]
  25. private ?Attendance $attendance = null;
  26. #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
  27. #[ORM\JoinColumn(nullable: true)]
  28. private ?Course $course = null;
  29. #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
  30. #[ORM\JoinColumn(nullable: true)]
  31. private ?EducationalProject $educationalProject = null;
  32. #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
  33. #[ORM\JoinColumn(nullable: true)]
  34. private ?Event $event = null;
  35. #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
  36. #[ORM\JoinColumn(nullable: true)]
  37. private ?Examen $examen = null;
  38. #[ORM\ManyToOne(inversedBy: 'attendanceBookings')]
  39. #[ORM\JoinColumn(nullable: true)]
  40. private ?AttendanceBookingReason $reason = null;
  41. public function getId(): ?int
  42. {
  43. return $this->id;
  44. }
  45. public function getAccess(): ?Access
  46. {
  47. return $this->access;
  48. }
  49. public function setAccess(?Access $access): self
  50. {
  51. $this->access = $access;
  52. return $this;
  53. }
  54. public function getAttendance(): ?Attendance
  55. {
  56. return $this->attendance;
  57. }
  58. public function setAttendance(?Attendance $attendance): self
  59. {
  60. $this->attendance = $attendance;
  61. return $this;
  62. }
  63. public function getCourse(): ?Course
  64. {
  65. return $this->course;
  66. }
  67. public function setCourse(?Course $course): self
  68. {
  69. $this->course = $course;
  70. return $this;
  71. }
  72. public function getEducationalProject(): ?EducationalProject
  73. {
  74. return $this->educationalProject;
  75. }
  76. public function setEducationalProject(?EducationalProject $educationalProject): self
  77. {
  78. $this->educationalProject = $educationalProject;
  79. return $this;
  80. }
  81. public function getEvent(): ?Event
  82. {
  83. return $this->event;
  84. }
  85. public function setEvent(?Event $event): self
  86. {
  87. $this->event = $event;
  88. return $this;
  89. }
  90. public function getExamen(): ?Examen
  91. {
  92. return $this->examen;
  93. }
  94. public function setExamen(?Examen $examen): self
  95. {
  96. $this->examen = $examen;
  97. return $this;
  98. }
  99. public function getReason(): AttendanceBookingReason
  100. {
  101. return $this->reason;
  102. }
  103. public function setReason(?AttendanceBookingReason $reason): self
  104. {
  105. $this->reason = $reason;
  106. return $this;
  107. }
  108. }