| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282 |
- <?php
- namespace AppBundle\Entity\AccessWish;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\ORM\Mapping as ORM;
- use Dunglas\ApiBundle\Annotation\Iri;
- use Finite\StatefulInterface;
- use Symfony\Component\Serializer\Annotation\Groups;
- use Symfony\Component\Validator\Constraints as Assert;
- use AppBundle\Entity\Traits\TimestampableEntity;
- use AppBundle\Entity\Traits\CreatorUpdaterEntity;
- /**
- * DocumentWish.
- *
- * @see http://schema.org/DocumentWish Documentation on Schema.org
- *
- * @Iri("http://schema.org/DocumentWish")
- */
- #[ORM\Entity]
- class DocumentWish
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['documentwish', 'online_registration', 'online_registration_validation', 'student_registration_person'])]
- private $id;
- /**
- * @var AccessWish
- *
- *
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessWish\AccessWish', inversedBy: 'documentWishes')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['documentwish'])]
- private $accessWish;
- /**
- * @var AccessWish
- *
- *
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Person\Person', inversedBy: 'documentWishes')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
- #[Groups(['documentwish'])]
- private $personOwner;
- /**
- * @var ArrayCollection<AppBundle\Entity\Core\File>.
- */
- #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\File', mappedBy: 'documentWish', orphanRemoval: true)]
- #[Groups(['documentwish', 'online_registration_documentwishes', 'online_registration_validation_documentwishes', 'access_files_person', 'student_registration_person'])]
- private $files;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['documentwish', 'online_registration_documentwishes', 'online_registration_validation_documentwishes', 'access_files_person', 'student_registration_person'])]
- private $label;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Assert\Choice(callback: ['\AppBundle\Enum\OnlineRegistration\FileTypeEnum', 'toArray'], message: 'invalid-choice')]
- #[Groups(['documentwish', 'online_registration_documentwishes', 'online_registration_validation_documentwishes', 'access_files_person', 'student_registration_person'])]
- private $type;
- /**
- * @var string
- */
- #[ORM\Column(type: 'text', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['documentwish', 'online_registration_documentwishes', 'online_registration_validation_documentwishes', 'access_files_person', 'student_registration_person'])]
- private $description;
- /**
- * Constructor
- */
- public function __construct()
- {
- $this->files = new ArrayCollection();
- }
- /**
- * Get id
- *
- * @return integer
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set days
- *
- * @param array $days
- *
- * @return EducationStudentWish
- */
- public function setDays($days)
- {
- $this->days = $days;
- return $this;
- }
- /**
- * Get days
- *
- * @return array
- */
- public function getDays()
- {
- return $this->days;
- }
- /**
- * Set education
- *
- * @param \AppBundle\Entity\Education\Education $education
- *
- * @return EducationStudentWish
- */
- public function setEducation(\AppBundle\Entity\Education\Education $education = null)
- {
- $this->education = $education;
- return $this;
- }
- /**
- * Get education
- *
- * @return \AppBundle\Entity\Education\Education
- */
- public function getEducation()
- {
- return $this->education;
- }
- /**
- * Set accessWish
- *
- * @param \AppBundle\Entity\AccessWish\AccessWish $accessWish
- *
- * @return EducationStudentWish
- */
- public function setAccessWish(\AppBundle\Entity\AccessWish\AccessWish $accessWish = null)
- {
- $this->accessWish = $accessWish;
- return $this;
- }
- /**
- * Get accessWish
- *
- * @return \AppBundle\Entity\AccessWish\AccessWish
- */
- public function getAccessWish()
- {
- return $this->accessWish;
- }
- /**
- * Set label
- *
- * @param string $label
- *
- * @return DocumentWish
- */
- public function setLabel($label)
- {
- $this->label = $label;
- return $this;
- }
- /**
- * Get label
- *
- * @return string
- */
- public function getLabel()
- {
- return $this->label;
- }
- /**
- * Set type
- *
- * @param string $type
- *
- * @return DocumentWish
- */
- public function setType($type)
- {
- $this->type = $type;
- return $this;
- }
- /**
- * Get type
- *
- * @return string
- */
- public function getType()
- {
- return $this->type;
- }
- /**
- * Set description
- *
- * @param string $description
- *
- * @return DocumentWish
- */
- public function setDescription($description)
- {
- $this->description = $description;
- return $this;
- }
- /**
- * Get description
- *
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
- /**
- * Add file
- *
- * @param \AppBundle\Entity\Core\File $file
- *
- * @return DocumentWish
- */
- public function addFile(\AppBundle\Entity\Core\File $file)
- {
- $file->setDocumentWish($this);
- $this->files[] = $file;
- return $this;
- }
- /**
- * Remove file
- *
- * @param \AppBundle\Entity\Core\File $file
- */
- public function removeFile(\AppBundle\Entity\Core\File $file)
- {
- $this->files->removeElement($file);
- }
- /**
- * Get files
- *
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getFiles()
- {
- return $this->files;
- }
- /**
- * Set personOwner
- *
- * @param \AppBundle\Entity\Person\Person $personOwner
- *
- * @return DocumentWish
- */
- public function setPersonOwner(\AppBundle\Entity\Person\Person $personOwner = null)
- {
- $this->personOwner = $personOwner;
- return $this;
- }
- /**
- * Get personOwner
- *
- * @return \AppBundle\Entity\Person\Person
- */
- public function getPersonOwner()
- {
- return $this->personOwner;
- }
- }
|