<?php

namespace AppBundle\Entity\Booking;

use AppBundle\Enum\TypeEnum;
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;

/**
 * Enum des genres d'évènements
 *
 * @Iri("http://schema.org/EventGender")
 */
#[ORM\Entity]
class EventGender
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['eventgender', 'activity_report'])]
    private $id;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 100)]
    #[Assert\Type(type: 'string')]
    #[Assert\NotNull]
    #[Groups(['eventgender'])]
    private $code;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 100)]
    #[Assert\Type(type: 'string')]
    #[Assert\NotNull]
    #[Groups(['eventgender', 'activity_report'])]
    private $name;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string')]
    #[Assert\Type(type: 'string')]
    #[Assert\NotNull]
    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\EventGenderTypeEnum', 'toArray'])]
    #[Groups(['eventgender', 'activity_report'])]
    private $type;
    /**
     * 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 code.
     * 
     * @param string $code
     * 
     * @return $this
     */
    public function setCode($code)
    {
        $this->code = $code;

        return $this;
    }
    /**
     * Gets code.
     * 
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }
    /**
     * Sets name.
     * 
     * @param string $name
     * 
     * @return $this
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }
    /**
     * Gets name.
     * 
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Sets type.
     * 
     * @param string $type
     * 
     * @return $this
     */
    public function setType($type)
    {
        $this->type = $type;

        return $this;
    }
    /**
     * Gets type.
     * 
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }
}
