WorkByUser.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. * TODO: documenter
  10. */
  11. // #[Auditable]
  12. #[ApiResource(operations: [])]
  13. #[ORM\Entity]
  14. class WorkByUser
  15. {
  16. #[ORM\Id]
  17. #[ORM\Column]
  18. #[ORM\GeneratedValue]
  19. private ?int $id = null;
  20. #[ORM\ManyToOne(inversedBy: 'workByUsers')]
  21. private ?Work $work = null;
  22. #[ORM\ManyToOne(inversedBy: 'workByUsers')]
  23. private ?Access $student = null;
  24. public function getId(): ?int
  25. {
  26. return $this->id;
  27. }
  28. public function getWork(): ?Work
  29. {
  30. return $this->work;
  31. }
  32. public function setWork(?Work $work): self
  33. {
  34. $this->work = $work;
  35. return $this;
  36. }
  37. public function getStudent(): ?Access
  38. {
  39. return $this->student;
  40. }
  41. public function setStudent(?Access $student): self
  42. {
  43. $this->student = $student;
  44. return $this;
  45. }
  46. }