<?php

declare(strict_types=1);

namespace Medienreaktor\Courses\Domain\Model;


/**
 * This file is part of the "Courses" Extension for TYPO3 CMS.
 *
 * For the full copyright and license information, please read the
 * LICENSE.txt file that was distributed with this source code.
 *
 * (c) 2023 Matthias Schieber <matthias.schieber@medienreaktor.de>, Medienreaktor
 */

/**
 * Course
 */
class Course extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{

    /**
     * title
     *
     * @var string
     */
    protected $title = '';

    /**
     * courseId
     *
     * @var int
     */
    protected $courseId = 0;

    /**
     * shortTitle
     *
     * @var string
     */
    protected $shortTitle = '';

    /**
     * contents
     *
     * @var string
     */
    protected $contents = '';

    /**
     * requirements
     *
     * @var string
     */
    protected $requirements = '';

    /**
     * language
     *
     * @var string
     */
    protected $language = '';

    /**
     * imageUri
     *
     * @var string
     */
    protected $imageUri = '';

    /**
     * price
     *
     * @var string
     */
    protected $price = '';

    /**
     * courseType
     *
     * @var string
     */
    protected $courseType = '';

    /**
     * goals
     *
     * @var string
     */
    protected $goals = '';

    /**
     * perspectives
     *
     * @var string
     */
    protected $perspectives = '';

    /**
     * duration
     *
     * @var int
     */
    protected $duration = 0;

    /**
     * agencySupported
     *
     * @var bool
     */
    protected $agencySupported = false;

    /**
     * ihkCertified
     *
     * @var bool
     */
    protected $ihkCertified = false;

    /**
     * individualAppointments
     *
     * @var bool
     */
    protected $individualAppointments = false;

    /**
     * targetGroup
     *
     * @var string
     */
    protected $targetGroup = '';

    /**
     * highlight
     *
     * @var bool
     */
    protected $highlight = false;

    /**
     * seoTitle
     *
     * @var string
     */
    protected $seoTitle = '';

    /**
     * seoDescription
     *
     * @var string
     */
    protected $seoDescription = '';

    /**
     * seoImage
     *
     * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
     */
    #[\TYPO3\CMS\Extbase\Annotation\ORM\Cascade(['value' => 'remove'])]
    protected $seoImage = '';

    /**
     * subject
     *
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Courses\Domain\Model\Subject>
     */
    protected $subject = null;

    /**
     * workshop
     *
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Courses\Domain\Model\Workshop>
     */
    #[\TYPO3\CMS\Extbase\Annotation\ORM\Cascade(['value' => 'remove'])]
    protected $workshop = null;

    /**
     * profession
     *
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Courses\Domain\Model\Profession>
     */
    protected $profession = null;

    /**
     * pathSegment
     *
     * @var string
     */
    protected $pathSegment = '';

    /**
     * __construct
     */
    public function __construct()
    {

        // Do not remove the next line: It would break the functionality
        $this->initializeObject();
    }

    /**
     * Initializes all ObjectStorage properties when model is reconstructed from DB (where __construct is not called)
     * Do not modify this method!
     * It will be rewritten on each save in the extension builder
     * You may modify the constructor of this class instead
     *
     * @return void
     */
    public function initializeObject(): void
    {
        $this->subject = $this->subject ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
        $this->workshop = $this->workshop ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
        $this->profession = $this->profession ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
    }

    /**
     * Returns the courseId
     *
     * @return int
     */
    public function getCourseId()
    {
        return $this->courseId;
    }

    /**
     * Sets the courseId
     *
     * @param int $courseId
     * @return void
     */
    public function setCourseId(int $courseId): void
    {
        $this->courseId = $courseId;
    }

    /**
     * Returns the title
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Sets the title
     *
     * @param string $title
     * @return void
     */
    public function setTitle(string $title): void
    {
        $this->title = $title;
    }

    /**
     * Returns the shortTitle
     *
     * @return string
     */
    public function getShortTitle()
    {
        return $this->shortTitle;
    }

    /**
     * Sets the shortTitle
     *
     * @param string $shortTitle
     * @return void
     */
    public function setShortTitle(string $shortTitle): void
    {
        $this->shortTitle = $shortTitle;
    }

    /**
     * Returns the contents
     *
     * @return string
     */
    public function getContents()
    {
        return $this->contents;
    }

    /**
     * Sets the contents
     *
     * @param string $contents
     * @return void
     */
    public function setContents(string $contents): void
    {
        $this->contents = $contents;
    }

    /**
     * Returns the requirements
     *
     * @return string
     */
    public function getRequirements()
    {
        return $this->requirements;
    }

    /**
     * Sets the requirements
     *
     * @param string $requirements
     * @return void
     */
    public function setRequirements(string $requirements): void
    {
        $this->requirements = $requirements;
    }

    /**
     * Returns the language
     *
     * @return string
     */
    public function getLanguage()
    {
        return $this->language;
    }

    /**
     * Sets the language
     *
     * @param string $language
     * @return void
     */
    public function setLanguage(string $language): void
    {
        $this->language = $language;
    }

    /**
     * Returns the imageUri
     *
     * @return string
     */
    public function getImageUri()
    {
        return $this->imageUri;
    }

    /**
     * Sets the imageUri
     *
     * @param string $imageUri
     * @return void
     */
    public function setImageUri(string $imageUri): void
    {
        $this->imageUri = $imageUri;
    }

    /**
     * Returns the price
     *
     * @return string
     */
    public function getPrice()
    {
        return $this->price;
    }

    /**
     * Sets the price
     *
     * @param string $price
     * @return void
     */
    public function setPrice(string $price): void
    {
        $this->price = $price;
    }

    /**
     * Returns the courseType
     *
     * @return string
     */
    public function getCourseType()
    {
        return $this->courseType;
    }

    /**
     * Sets the courseType
     *
     * @param string $courseType
     * @return void
     */
    public function setCourseType(string $courseType): void
    {
        $this->courseType = $courseType;
    }

    /**
     * Returns the goals
     *
     * @return string
     */
    public function getGoals()
    {
        return $this->goals;
    }

    /**
     * Sets the goals
     *
     * @param string $goals
     * @return void
     */
    public function setGoals(string $goals): void
    {
        $this->goals = $goals;
    }

    /**
     * Returns the perspectives
     *
     * @return string
     */
    public function getPerspectives()
    {
        return $this->perspectives;
    }

    /**
     * Sets the perspectives
     *
     * @param string $perspectives
     * @return void
     */
    public function setPerspectives(string $perspectives): void
    {
        $this->perspectives = $perspectives;
    }

    /**
     * Returns the duration
     *
     * @return int
     */
    public function getDuration()
    {
        return $this->duration;
    }

    /**
     * Sets the duration
     *
     * @param int $duration
     * @return void
     */
    public function setDuration(int $duration): void
    {
        $this->duration = $duration;
    }

    /**
     * Returns the agencySupported
     *
     * @return bool
     */
    public function getAgencySupported()
    {
        return $this->agencySupported;
    }

    /**
     * Sets the agencySupported
     *
     * @param bool $agencySupported
     * @return void
     */
    public function setAgencySupported(bool $agencySupported): void
    {
        $this->agencySupported = $agencySupported;
    }

    /**
     * Returns the boolean state of agencySupported
     *
     * @return bool
     */
    public function isAgencySupported()
    {
        return $this->agencySupported;
    }

    /**
     * Returns the ihkCertified
     *
     * @return bool
     */
    public function getIhkCertified()
    {
        return $this->ihkCertified;
    }

    /**
     * Sets the ihkCertified
     *
     * @param bool $ihkCertified
     * @return void
     */
    public function setIhkCertified(bool $ihkCertified): void
    {
        $this->ihkCertified = $ihkCertified;
    }

    /**
     * Returns the boolean state of ihkCertified
     *
     * @return bool
     */
    public function isIhkCertified()
    {
        return $this->ihkCertified;
    }

    /**
     * Returns the individualAppointments
     *
     * @return bool
     */
    public function getIndividualAppointments()
    {
        return $this->individualAppointments;
    }

    /**
     * Sets the individualAppointments
     *
     * @param bool $individualAppointments
     * @return void
     */
    public function setIndividualAppointments(bool $individualAppointments): void
    {
        $this->individualAppointments = $individualAppointments;
    }

    /**
     * Returns the boolean state of individualAppointments
     *
     * @return bool
     */
    public function isIndividualAppointments()
    {
        return $this->individualAppointments;
    }

    /**
     * Adds a Subject
     *
     * @param \Medienreaktor\Courses\Domain\Model\Subject $subject
     * @return void
     */
    public function addSubject(\Medienreaktor\Courses\Domain\Model\Subject $subject): void
    {
        $this->subject->attach($subject);
    }

    /**
     * Removes a Subject
     *
     * @param \Medienreaktor\Courses\Domain\Model\Subject $subjectToRemove The Subject to be removed
     * @return void
     */
    public function removeSubject(\Medienreaktor\Courses\Domain\Model\Subject $subjectToRemove): void
    {
        $this->subject->detach($subjectToRemove);
    }

    /**
     * Returns the subject
     *
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Courses\Domain\Model\Subject>
     */
    public function getSubject()
    {
        return $this->subject;
    }

    /**
     * Sets the subject
     *
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Courses\Domain\Model\Subject> $subject
     * @return void
     */
    public function setSubject(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $subject): void
    {
        $this->subject = $subject;
    }

    /**
     * Adds a Workshop
     *
     * @param \Medienreaktor\Courses\Domain\Model\Workshop $workshop
     * @return void
     */
    public function addWorkshop(\Medienreaktor\Courses\Domain\Model\Workshop $workshop): void
    {
        $this->workshop->attach($workshop);
    }

    /**
     * Removes a Workshop
     *
     * @param \Medienreaktor\Courses\Domain\Model\Workshop $workshopToRemove The Workshop to be removed
     * @return void
     */
    public function removeWorkshop(\Medienreaktor\Courses\Domain\Model\Workshop $workshopToRemove): void
    {
        $this->workshop->detach($workshopToRemove);
    }

    /**
     * Returns the workshop
     *
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Courses\Domain\Model\Workshop>
     */
    public function getWorkshop()
    {
        return $this->workshop;
    }

    /**
     * Sets the workshop
     *
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Courses\Domain\Model\Workshop> $workshop
     * @return void
     */
    public function setWorkshop(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $workshop): void
    {
        $this->workshop = $workshop;
    }

    /**
     * Returns the targetGroup
     *
     * @return string
     */
    public function getTargetGroup()
    {
        return $this->targetGroup;
    }

    /**
     * Sets the targetGroup
     *
     * @param string $targetGroup
     * @return void
     */
    public function setTargetGroup(string $targetGroup): void
    {
        $this->targetGroup = $targetGroup;
    }

    /**
     * Returns the seoTitle
     *
     * @return string
     */
    public function getSeoTitle()
    {
        return $this->seoTitle;
    }

    /**
     * Sets the seoTitle
     *
     * @param string $seoTitle
     * @return void
     */
    public function setSeoTitle(string $seoTitle): void
    {
        $this->seoTitle = $seoTitle;
    }

    /**
     * Returns the seoDescription
     *
     * @return string
     */
    public function getSeoDescription()
    {
        return $this->seoDescription;
    }

    /**
     * Sets the seoDescription
     *
     * @param string $seoDescription
     * @return void
     */
    public function setSeoDescription(string $seoDescription): void
    {
        $this->seoDescription = $seoDescription;
    }

    /**
     * Returns the seoImage
     *
     * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference seoImage
     */
    public function getSeoImage()
    {
        return $this->seoImage;
    }

    /**
     * Sets the seoImage
     *
     * @param string $seoImage
     * @return void
     */
    public function setSeoImage(string $seoImage): void
    {
        $this->seoImage = $seoImage;
    }

    /**
     * Returns the highlight
     *
     * @return bool
     */
    public function getHighlight()
    {
        return $this->highlight;
    }

    /**
     * Sets the highlight
     *
     * @param bool $highlight
     * @return void
     */
    public function setHighlight(bool $highlight): void
    {
        $this->highlight = $highlight;
    }

    /**
     * Returns the boolean state of highlight
     *
     * @return bool
     */
    public function isHighlight()
    {
        return $this->highlight;
    }

    /**
     * Adds a Profession
     *
     * @param \Medienreaktor\Courses\Domain\Model\Profession $profession
     * @return void
     */
    public function addProfession(\Medienreaktor\Courses\Domain\Model\Profession $profession): void
    {
        $this->profession->attach($profession);
    }

    /**
     * Removes a Profession
     *
     * @param \Medienreaktor\Courses\Domain\Model\Profession $professionToRemove The Profession to be removed
     * @return void
     */
    public function removeProfession(\Medienreaktor\Courses\Domain\Model\Profession $professionToRemove): void
    {
        $this->profession->detach($professionToRemove);
    }

    /**
     * Returns the profession
     *
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Courses\Domain\Model\Profession>
     */
    public function getProfession()
    {
        return $this->profession;
    }

    /**
     * Sets the profession
     *
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Courses\Domain\Model\Profession> $profession
     * @return void
     */
    public function setProfession(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $profession): void
    {
        $this->profession = $profession;
    }

    /**
     * Returns the pathSegment
     *
     * @return string
     */
    public function getPathSegment()
    {
        return $this->pathSegment;
    }

    /**
     * Sets the pathSegment
     *
     * @param string $pathSegment
     * @return void
     */
    public function setPathSegment(string $pathSegment): void
    {
        $this->pathSegment = $pathSegment;
    }
}
