<?php


namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use JsonSerializable;

/**
 * @ORM\Table(name="awardees")
 * @ORM\Entity
 */
class Awardee
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type="integer")
     * @var int
     */
    private $id;

    /**
     * @ORM\Column(name="year", type="integer")
     * @var int
     */
    private $year;

    /**
     * @ORM\Column(name="name", type="string", length=200, nullable=false)
     * @var string
     */
    private $name;

    /**
     * @ORM\Column(name="description", type="text", nullable=false)
     * @var string
     */
    private $text;

    /**
     * @ORM\Column(name="image_label", type="string", length=255, unique=true)
     * @var string
     */
    private $imageLabel;

    /**
     * @Gedmo\Slug(fields={"year", "name"})
     * @ORM\Column(length=128, unique=true)
     * @var string
     */
    private $slug;

    /**
     * @return int
     */
    public function getId(): int
    {
        return $this->id;
    }

    /**
     * @param int $id
     * @return Awardee
     */
    public function setId(int $id): Awardee
    {
        $this->id = $id;
        return $this;
    }

    /**
     * @return int
     */
    public function getYear(): int
    {
        return $this->year;
    }

    /**
     * @param int $year
     * @return Awardee
     */
    public function setYear(int $year): Awardee
    {
        $this->year = $year;
        return $this;
    }

    /**
     * @return string
     */
    public function getName(): string
    {
        return $this->name;
    }

    /**
     * @param string $name
     * @return Awardee
     */
    public function setName(string $name): Awardee
    {
        $this->name = $name;
        return $this;
    }

    /**
     * @return string
     */
    public function getText(): string
    {
        return $this->text;
    }

    /**
     * @param string $text
     * @return Awardee
     */
    public function setText(string $text): Awardee
    {
        $this->text = $text;
        return $this;
    }

    /**
     * @return string
     */
    public function getImageLabel(): string
    {
        return $this->imageLabel;
    }

    /**
     * @param string $imageLabel
     * @return Awardee
     */
    public function setImageLabel(string $imageLabel): Awardee
    {
        $this->imageLabel = $imageLabel;
        return $this;
    }

    /**
     * @return string
     */
    public function getSlug(): string
    {
        return $this->slug;
    }

    /**
     * @param string $slug
     * @return Awardee
     */
    public function setSlug(string $slug): Awardee
    {
        $this->slug = $slug;
        return $this;
    }

    /**
     * @return array
     */
    public function jsonSerialize()
    {
        return [
            'id' => $this->getId(),
            'year' => $this->getYear(),
            'name' => $this->getYear(),
            'text' => $this->getText(),
            'imageLabel' => $this->getImageLabel(),
            'slug' => $this->getSlug(),
        ];
    }
}
