EducationalProjectPayer.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. declare (strict_types=1);
  3. namespace App\Entity\Billing;
  4. use ApiPlatform\Metadata\Get;
  5. use ApiPlatform\Metadata\ApiResource;
  6. use App\Entity\Access\Access;
  7. use App\Entity\Booking\EducationalProject;
  8. //use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
  9. use Doctrine\ORM\Mapping as ORM;
  10. /**
  11. * @todo : A la suite de la migration, il faut supprimer le nom de la table pour avoir une table EducationalProjectPayer, et supprimer l'attribut discr.
  12. *
  13. * Classe ... qui ...
  14. */
  15. #[ApiResource(operations: [])]
  16. //#[Auditable]
  17. #[ORM\Table(name: 'BillingPayer')]
  18. #[ORM\Entity]
  19. class EducationalProjectPayer
  20. {
  21. #[ORM\Column(length: 255, nullable: false)]
  22. private string $discr = 'educationalproject';
  23. #[ORM\Id]
  24. #[ORM\Column]
  25. #[ORM\GeneratedValue]
  26. private ?int $id = null;
  27. #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'billingEducationalProjectPayers')]
  28. private Access $educationalProjectPayer;
  29. #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'billingReceivers')]
  30. private EducationalProject $educationalProjectReceiver;
  31. public function getId(): ?int
  32. {
  33. return $this->id;
  34. }
  35. public function getEducationalProjectPayer(): ?Access
  36. {
  37. return $this->educationalProjectPayer;
  38. }
  39. public function setEducationalProjectPayer(?Access $educationalProjectPayer): self
  40. {
  41. $this->educationalProjectPayer = $educationalProjectPayer;
  42. return $this;
  43. }
  44. public function getEducationalProjectReceiver(): ?EducationalProject
  45. {
  46. return $this->educationalProjectReceiver;
  47. }
  48. public function setEducationalProjectReceiver(?EducationalProject $educationalProjectReceiver): self
  49. {
  50. $this->educationalProjectReceiver = $educationalProjectReceiver;
  51. return $this;
  52. }
  53. }