| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- <?php
- namespace AppBundle\Entity\Education;
- use AppBundle\Entity\Organization\Organization;
- use AppBundle\Annotation\DefaultField;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\ORM\Mapping as ORM;
- use Dunglas\ApiBundle\Annotation\Iri;
- use Symfony\Component\Serializer\Annotation\Groups;
- use Symfony\Component\Validator\Constraints as Assert;
- use AppBundle\Entity\Traits\TimestampableEntity;
- use AppBundle\Entity\Traits\CreatorUpdaterEntity;
- /**
- * Catégorie de l'enseignement Education
- *
- * @Iri("http://schema.org/EducationCategory")
- */
- #[ORM\Entity]
- class EducationCategory
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['educationcategory', 'education_reference', 'planning_list', 'access_details_practicalcourses', 'student_list_courses', 'educationstudent_reference_educationcurriculum', 'educations_quotas_by_education_list', 'educations_quotas_stats'])]
- private $id;
- /**
- * @var Organization
- *
- * @DefaultField
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\Organization', inversedBy: 'educationCategories')]
- #[ORM\JoinColumn(nullable: false)]
- #[Assert\NotNull]
- #[Groups(['educationcategory'])]
- private $organization;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\NotNull]
- #[Assert\Choice(callback: ['\AppBundle\Enum\Education\EducationTypeEnum', 'toArray'])]
- #[Groups(['educationcategory', 'access_details_educationstudent', 'educations_quotas_by_education_list_educationcategory'])]
- private $educationTypeEnum;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string')]
- #[Assert\Type(type: 'string')]
- #[Assert\NotNull]
- #[Groups(['educationcategory', 'access_details_educationstudent', 'educationcategory_reference', 'educationcurriculum_reference_education', 'education_reference_educationcategory', 'student_list_educationstudent', 'intangible_list_educationcurriculums', 'examenconvocation_list_examen', 'my_student_list_educationcurriculum', 'planning_list', 'attendancebooking_list_course', 'generate_attendance', 'report_card_educationstudent', 'access_details_practicalcourses', 'presence_attendance_education', 'student_list_courses', 'examen_details_education', 'course_details_education', 'educationstudent_reference_educationcurriculum', 'edu_stu_courses_courses', 'student_registration_courses', 'educationnotation_list_educationstudent', 'accesses_courseteacher_show_practicalcourses', 'planning_detail_education', 'education_input_list_educationcurriculum', 'education_input_list_access', 'education_input_list_access', 'access_attendance_detail_attendancebookings', 'education_student_wish_list_educationwish', 'education_student_next_year_educationcurriculum', 'education_student_next_year_educationstudentlastyear', 'access_intangible_list_intangible', 'worksbyusers_db_work', 'accesses_no_reregistred_list_educationstudent', 'educationstudent_notation_educationcurriculum', 'educations_quotas_by_education_list_educationcategory'])]
- private $label;
- /**
- * @var ArrayCollection<Education>
- */
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\Education', mappedBy: 'educationCategory', orphanRemoval: true)]
- #[Groups(['educationcategory_education'])]
- private $educations;
- /**
- * Constructor
- */
- public function __construct()
- {
- $this->educations = new ArrayCollection();
- }
- /**
- * Sets id.
- *
- * @param int $id
- *
- * @return $this
- */
- public function setId($id)
- {
- $this->id = $id;
- return $this;
- }
- /**
- * Gets id.
- *
- * @return int
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Sets organization.
- *
- * @param Organization $organization
- *
- * @return $this
- */
- public function setOrganization(Organization $organization)
- {
- $this->organization = $organization;
- return $this;
- }
- /**
- * Gets organization.
- *
- * @return Organization
- */
- public function getOrganization()
- {
- return $this->organization;
- }
- /**
- * Sets educationTypeEnum.
- *
- * @param String $educationTypeEnum
- *
- * @return $this
- */
- public function setEducationTypeEnum($educationTypeEnum)
- {
- $this->educationTypeEnum = $educationTypeEnum;
- return $this;
- }
- /**
- * Gets educationTypeEnum.
- *
- * @return String
- */
- public function getEducationTypeEnum()
- {
- return $this->educationTypeEnum;
- }
- /**
- * Sets label.
- *
- * @param string $label
- *
- * @return $this
- */
- public function setLabel($label)
- {
- $this->label = $label;
- return $this;
- }
- /**
- * Gets label.
- *
- * @return string
- */
- public function getLabel()
- {
- return $this->label;
- }
- /**
- * Add education
- *
- * @param \AppBundle\Entity\Education\Education $education
- *
- * @return EducationCategory
- */
- public function addEducation(\AppBundle\Entity\Education\Education $education)
- {
- $this->educations[] = $education;
- return $this;
- }
- /**
- * Remove education
- *
- * @param \AppBundle\Entity\Education\Education $education
- */
- public function removeEducation(\AppBundle\Entity\Education\Education $education)
- {
- $this->educations->removeElement($education);
- }
- /**
- * Get educations
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getEducations()
- {
- return $this->educations;
- }
- }
|