EducationCurriculumPack.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Education;
  4. use ApiPlatform\Metadata\ApiResource;
  5. use App;
  6. use App\Entity\Core\Tagg;
  7. use App\Entity\Organization\Organization;
  8. use App\Entity\Product\Intangible;
  9. use DateTimeInterface;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use Doctrine\Common\Collections\Collection;
  12. use Doctrine\ORM\Mapping as ORM;
  13. #[ApiResource(operations: [])]
  14. #[ORM\Entity]
  15. class EducationCurriculumPack
  16. {
  17. #[ORM\Id]
  18. #[ORM\Column]
  19. #[ORM\GeneratedValue]
  20. private int $id;
  21. #[ORM\ManyToOne(targetEntity: Organization::class, cascade: [], inversedBy: 'educationCurriculumPacks')]
  22. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
  23. public App\Entity\Organization\Organization $organization;
  24. #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'educationCurriculumPacks', cascade: ['persist'], orphanRemoval: false)]
  25. public Collection $tags;
  26. #[ORM\ManyToMany(
  27. targetEntity: EducationCurriculum::class,
  28. inversedBy: 'requiredEducationCurriculumPacks',
  29. cascade: [],
  30. orphanRemoval: false,
  31. )]
  32. public Collection $requiredEducationCurriculums;
  33. #[ORM\ManyToMany(
  34. targetEntity: EducationCurriculum::class,
  35. inversedBy: 'requiredChoicesEducationCurriculumPacks',
  36. cascade: [],
  37. orphanRemoval: false,
  38. )]
  39. public Collection $requiredChoicesEducationCurriculums;
  40. #[ORM\ManyToMany(
  41. targetEntity: EducationCurriculum::class,
  42. inversedBy: 'optionnalEducationCurriculumPacks',
  43. cascade: [],
  44. orphanRemoval: false,
  45. )]
  46. public Collection $optionnalEducationCurriculums;
  47. #[ORM\ManyToMany(targetEntity: Intangible::class, mappedBy: 'educationCurriculumPacks', cascade: [], orphanRemoval: false)]
  48. public Collection $intangibles;
  49. function getId(): int
  50. {
  51. return $this->id;
  52. }
  53. function setId(int $id): self
  54. {
  55. $this->id = $id;
  56. return $this;
  57. }
  58. function getOrganization(): App\Entity\Organization\Organization
  59. {
  60. return $this->organization;
  61. }
  62. function setOrganization(App\Entity\Organization\Organization $organization): self
  63. {
  64. $this->organization = $organization;
  65. return $this;
  66. }
  67. function getTags(): Collection
  68. {
  69. return $this->tags;
  70. }
  71. function setTags(Collection $tags): self
  72. {
  73. $this->tags = $tags;
  74. return $this;
  75. }
  76. function getRequiredEducationCurriculums(): Collection
  77. {
  78. return $this->requiredEducationCurriculums;
  79. }
  80. function setRequiredEducationCurriculums(Collection $requiredEducationCurriculums): self
  81. {
  82. $this->requiredEducationCurriculums = $requiredEducationCurriculums;
  83. return $this;
  84. }
  85. function getRequiredChoicesEducationCurriculums(): Collection
  86. {
  87. return $this->requiredChoicesEducationCurriculums;
  88. }
  89. function setRequiredChoicesEducationCurriculums(Collection $requiredChoicesEducationCurriculums): self
  90. {
  91. $this->requiredChoicesEducationCurriculums = $requiredChoicesEducationCurriculums;
  92. return $this;
  93. }
  94. function getOptionnalEducationCurriculums(): Collection
  95. {
  96. return $this->optionnalEducationCurriculums;
  97. }
  98. function setOptionnalEducationCurriculums(Collection $optionnalEducationCurriculums): self
  99. {
  100. $this->optionnalEducationCurriculums = $optionnalEducationCurriculums;
  101. return $this;
  102. }
  103. function getIntangibles(): Collection
  104. {
  105. return $this->intangibles;
  106. }
  107. function setIntangibles(Collection $intangibles): self
  108. {
  109. $this->intangibles = $intangibles;
  110. return $this;
  111. }
  112. }