| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <?php
- namespace AppBundle\Entity\Booking;
- 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;
- /**
- * Type de public d'une prestation pédagogique EducationnalProject
- *
- * @Iri("http://schema.org/EducationalProjectPublic")
- */
- #[ORM\Entity]
- class EducationalProjectPublic
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['educationalprojectpublic', 'educationalproject_details'])]
- private $id;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 255, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\EducationalProjectPublicFamillyEnum', 'toArray'])]
- #[Groups(['educationalprojectpublic'])]
- private $familly;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 255)]
- #[Assert\Type(type: 'string')]
- #[Assert\NotNull]
- #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\EducationalProjectPublicFamillyEnum', 'toArray'])]
- #[Groups(['educationalprojectpublic', 'educationalproject_details_public'])]
- private $subFamilly;
- /**
- * @var ArrayCollection<EducationalProject>
- */
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\EducationalProject', mappedBy: 'public')]
- #[Groups(['educationalprojectpublic_educationalproject'])]
- private $educationalProjects;
- /**
- * Constructor
- */
- public function __construct()
- {
- $this->educationalProjects = 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 familly.
- *
- * @param string $familly
- *
- * @return $this
- */
- public function setFamilly($familly)
- {
- $this->familly = $familly;
- return $this;
- }
- /**
- * Gets familly.
- *
- * @return string
- */
- public function getFamilly()
- {
- return $this->familly;
- }
- /**
- * Sets subFamilly.
- *
- * @param string $subFamilly
- *
- * @return $this
- */
- public function setSubFamilly($subFamilly)
- {
- $this->subFamilly = $subFamilly;
- return $this;
- }
- /**
- * Gets subFamilly.
- *
- * @return string
- */
- public function getSubFamilly()
- {
- return $this->subFamilly;
- }
- /**
- * Add educationalProject
- *
- * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject
- *
- * @return EducationalProjectPublic
- */
- public function addEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject)
- {
- $this->educationalProjects[] = $educationalProject;
- return $this;
- }
- /**
- * Remove educationalProject
- *
- * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject
- */
- public function removeEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject)
- {
- $this->educationalProjects->removeElement($educationalProject);
- }
- /**
- * Get educationalProjects
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getEducationalProjects()
- {
- return $this->educationalProjects;
- }
- }
|