<?php

namespace AppBundle\Entity\Education;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use AppBundle\Entity\Traits\TimestampableEntity;
use AppBundle\Entity\Traits\CreatorUpdaterEntity;

/**
 * (Non utilisé, à confirmer)
 */
#[ORM\Entity]
class CycleByEducation
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['cyclebyeducation'])]
    private $id;
    /**
     * @var string
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\Education', inversedBy: 'cycleByEducations')]
    #[Assert\NotNull]
    #[Groups(['cyclebyeducation'])]
    private $education;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', options: ['default' => true])]
    #[Assert\Type(type: 'boolean')]
    #[Assert\NotNull]
    #[Groups(['cyclebyeducation'])]
    private $isActive = true;
    /**
     * @var string
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\Cycle')]
    #[Assert\NotNull]
    #[Groups(['cyclebyeducation', 'access_details_education_student'])]
    private $cycle;
    /**
     * @var integer
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['cyclebyeducation', 'access_details_education_student'])]
    private $years;
    /**
     * 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 education.
     *
     * @param string $education
     *
     * @return $this
     */
    public function setEducation($education)
    {
        $this->education = $education;

        return $this;
    }
    /**
     * Gets education.
     *
     * @return string
     */
    public function getEducation()
    {
        return $this->education;
    }
    /**
     * Set isActive
     *
     * @param boolean $isActive
     *
     * @return CycleByNotation
     */
    public function setIsActive($isActive)
    {
        $this->isActive = $isActive;

        return $this;
    }
    /**
     * Get isActive
     *
     * @return boolean
     */
    public function getIsActive()
    {
        return $this->isActive;
    }
    /**
     * Sets cycle.
     *
     * @param string $cycle
     *
     * @return $this
     */
    public function setCycle($cycle)
    {
        $this->cycle = $cycle;

        return $this;
    }
    /**
     * Gets cycle.
     *
     * @return string
     */
    public function getCycle()
    {
        return $this->cycle;
    }
    /**
     * Sets years.
     *
     * @param integer $years
     *
     * @return $this
     */
    public function setYears($years)
    {
        $this->years = $years;

        return $this;
    }
    /**
     * Gets years.
     *
     * @return integer
     */
    public function getYears()
    {
        return $this->years;
    }
}
