<?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;
    }
}
