EducationalProjectPayer.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. namespace AppBundle\Entity\Billing;
  3. use AppBundle\Entity\AccessAndFunction\Access;
  4. use AppBundle\Entity\Booking\EducationalProject;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Dunglas\ApiBundle\Annotation\Iri;
  8. use Symfony\Component\Serializer\Annotation\Groups;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. use AppBundle\Entity\Traits\TimestampableEntity;
  11. use AppBundle\Entity\Traits\CreatorUpdaterEntity;
  12. /**
  13. *
  14. * Fais le lien entre l'Access qui règle la facture et l'EducationalProject concerné
  15. *
  16. * @Iri("http://schema.org/EducationalProjectPayer")
  17. */
  18. #[ORM\Entity]
  19. class EducationalProjectPayer extends AbstractBillingPayer
  20. {
  21. /**
  22. * @var Access
  23. */
  24. #[Assert\Valid]
  25. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'billingEducationalProjectPayers', cascade: ['persist'])]
  26. #[Groups(['educationalprojectpayer', 'educationalproject_details_billingreceivers', 'accessbilling_edit_billingeducationalprojectpayers'])]
  27. private $educationalProjectPayer;
  28. /**
  29. * @var EducationalProject
  30. */
  31. #[Assert\Valid]
  32. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Booking\EducationalProject', inversedBy: 'billingReceivers', cascade: ['persist'])]
  33. #[Groups(['educationalprojectpayer', 'accessbilling_edit_billingeducationalprojectpayers'])]
  34. private $educationalProjectReceiver;
  35. /**
  36. * Set educationalProjectReceiver
  37. *
  38. * @param \AppBundle\Entity\Booking\EducationalProject $educationalProjectReceiver
  39. *
  40. * @return EducationalProjectPayer
  41. */
  42. public function setEducationalProjectReceiver(\AppBundle\Entity\Booking\EducationalProject $educationalProjectReceiver = null)
  43. {
  44. $this->educationalProjectReceiver = $educationalProjectReceiver;
  45. return $this;
  46. }
  47. /**
  48. * Get educationalProjectReceiver
  49. *
  50. * @return \AppBundle\Entity\Booking\EducationalProject
  51. */
  52. public function getEducationalProjectReceiver()
  53. {
  54. return $this->educationalProjectReceiver;
  55. }
  56. /**
  57. * Set educationalProjectPayer
  58. *
  59. * @param \AppBundle\Entity\AccessAndFunction\Access $educationalProjectPayer
  60. *
  61. * @return EducationalProjectPayer
  62. */
  63. public function setEducationalProjectPayer(\AppBundle\Entity\AccessAndFunction\Access $educationalProjectPayer = null)
  64. {
  65. $this->educationalProjectPayer = $educationalProjectPayer;
  66. return $this;
  67. }
  68. /**
  69. * Get educationalProjectPayer
  70. *
  71. * @return \AppBundle\Entity\AccessAndFunction\Access
  72. */
  73. public function getEducationalProjectPayer()
  74. {
  75. return $this->educationalProjectPayer;
  76. }
  77. }