CycleByEducation.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <?php
  2. namespace AppBundle\Entity\Education;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Serializer\Annotation\Groups;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use AppBundle\Entity\Traits\TimestampableEntity;
  7. use AppBundle\Entity\Traits\CreatorUpdaterEntity;
  8. /**
  9. * (Non utilisé, à confirmer)
  10. */
  11. #[ORM\Entity]
  12. class CycleByEducation
  13. {
  14. use TimestampableEntity;
  15. use CreatorUpdaterEntity;
  16. /**
  17. * @var int
  18. */
  19. #[ORM\Column(type: 'integer')]
  20. #[ORM\Id]
  21. #[ORM\GeneratedValue(strategy: 'AUTO')]
  22. #[Groups(['cyclebyeducation'])]
  23. private $id;
  24. /**
  25. * @var string
  26. */
  27. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\Education', inversedBy: 'cycleByEducations')]
  28. #[Assert\NotNull]
  29. #[Groups(['cyclebyeducation'])]
  30. private $education;
  31. /**
  32. * @var bool
  33. */
  34. #[ORM\Column(type: 'boolean', options: ['default' => true])]
  35. #[Assert\Type(type: 'boolean')]
  36. #[Assert\NotNull]
  37. #[Groups(['cyclebyeducation'])]
  38. private $isActive = true;
  39. /**
  40. * @var string
  41. */
  42. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\Cycle')]
  43. #[Assert\NotNull]
  44. #[Groups(['cyclebyeducation', 'access_details_education_student'])]
  45. private $cycle;
  46. /**
  47. * @var integer
  48. */
  49. #[ORM\Column(type: 'integer', nullable: true)]
  50. #[Assert\Type(type: 'integer', message: 'invalid-integer')]
  51. #[Groups(['cyclebyeducation', 'access_details_education_student'])]
  52. private $years;
  53. /**
  54. * Sets id.
  55. *
  56. * @param int $id
  57. *
  58. * @return $this
  59. */
  60. public function setId($id)
  61. {
  62. $this->id = $id;
  63. return $this;
  64. }
  65. /**
  66. * Gets id.
  67. *
  68. * @return int
  69. */
  70. public function getId()
  71. {
  72. return $this->id;
  73. }
  74. /**
  75. * Sets education.
  76. *
  77. * @param string $education
  78. *
  79. * @return $this
  80. */
  81. public function setEducation($education)
  82. {
  83. $this->education = $education;
  84. return $this;
  85. }
  86. /**
  87. * Gets education.
  88. *
  89. * @return string
  90. */
  91. public function getEducation()
  92. {
  93. return $this->education;
  94. }
  95. /**
  96. * Set isActive
  97. *
  98. * @param boolean $isActive
  99. *
  100. * @return CycleByNotation
  101. */
  102. public function setIsActive($isActive)
  103. {
  104. $this->isActive = $isActive;
  105. return $this;
  106. }
  107. /**
  108. * Get isActive
  109. *
  110. * @return boolean
  111. */
  112. public function getIsActive()
  113. {
  114. return $this->isActive;
  115. }
  116. /**
  117. * Sets cycle.
  118. *
  119. * @param string $cycle
  120. *
  121. * @return $this
  122. */
  123. public function setCycle($cycle)
  124. {
  125. $this->cycle = $cycle;
  126. return $this;
  127. }
  128. /**
  129. * Gets cycle.
  130. *
  131. * @return string
  132. */
  133. public function getCycle()
  134. {
  135. return $this->cycle;
  136. }
  137. /**
  138. * Sets years.
  139. *
  140. * @param integer $years
  141. *
  142. * @return $this
  143. */
  144. public function setYears($years)
  145. {
  146. $this->years = $years;
  147. return $this;
  148. }
  149. /**
  150. * Gets years.
  151. *
  152. * @return integer
  153. */
  154. public function getYears()
  155. {
  156. return $this->years;
  157. }
  158. }