<?php

namespace AppBundle\Entity\Core;

use Doctrine\ORM\Mapping as ORM;
use Dunglas\ApiBundle\Annotation\Iri;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * Enum des types d'art
 *
 * @Iri("http://schema.org/Familly")
 */
#[ORM\Entity]
class Familly
{
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['familly', 'categories_reference'])]
    private $id;
    /**
     * @var string The name of the item.
     *
     * @Iri("https://schema.org/name")
     */
    #[ORM\Column(type: 'string')]
    #[Assert\Type(type: 'string')]
    #[Assert\NotNull]
    #[Groups(['familly', 'categories_reference_familly'])]
    private $name;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string')]
    #[Assert\Type(type: 'string')]
    #[Assert\NotNull]
    #[Groups(['familly'])]
    private $code;
    /**
     * 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 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 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;
    }
    /**
     * NEED THIS FOR ELASTICA TRANSLATABLE
     * @return null
     */
    public function getTranslatable(){
        return null;
    }
}
