<?php

namespace Application\Model;

use Ainias\Core\Model\StandardModel;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass="Application\Model\Repository\LevelRepository")
 * @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="levelCore",columns={"words", "positions", "renderer", "lang"})})
 */
class Level extends StandardModel
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @ORM\Column(type="integer")
     */
    protected $id;

    /**
     * @ORM\Column(type="string", length=255)
     * @var string
     */
    protected $words;

    /**
     * @ORM\Column(type="string", length=255)
     * @var string
     */
    protected $positions;

    /**
     * @ORM\Column(type="integer")
     * @var int
     */
    protected $renderer;

    /**
     * @ORM\Column(type="datetime")
     * @var \DateTime
     */
    protected $lastUpdated;

    /**
     * @ORM\Column(type="integer")
     * @var int
     */
    protected $lang;

    /**
     * @ORM\Column(type="boolean")
     * @var bool
     */
    protected $deleted;

    /**
     * @ORM\Column(type="integer")
     * @var int
     */
    protected $difficulty;

    /**
     * @ORM\OneToMany(targetEntity="\Application\Model\Rating", mappedBy="level", cascade="all")
     * @var Rating[]
     */
    protected $ratings;

    /**
     * Level constructor.
     */
    public function __construct()
    {
        $this->id = null;
        $this->ratings = new ArrayCollection();
    }

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

    /**
     * @param mixed $id
     */
    public function setId($id)
    {
        $this->id = $id;
    }

    /**
     * @return string
     */
    public function getWords()
    {
        return $this->words;
    }

    /**
     * @param string $words
     */
    public function setWords($words)
    {
        $this->words = $words;
    }

    /**
     * @return string
     */
    public function getPositions()
    {
        return $this->positions;
    }

    /**
     * @param string $positions
     */
    public function setPositions($positions)
    {
        $this->positions = $positions;
    }

    /**
     * @return Rating[]|ArrayCollection
     */
    public function getRatings()
    {
        return $this->ratings;
    }

    /**
     * @param Rating[] $ratings
     */
    public function setRatings($ratings)
    {
        $this->ratings = $ratings;
    }

    /**
     * @return int
     */
    public function getRenderer()
    {
        return $this->renderer;
    }

    /**
     * @param int $renderer
     */
    public function setRenderer($renderer)
    {
        $this->renderer = $renderer;
    }

    /**
     * @return \DateTime
     */
    public function getLastUpdated()
    {
        return $this->lastUpdated;
    }

    /**
     * @param \DateTime $lastUpdated
     */
    public function setLastUpdated($lastUpdated)
    {
        $this->lastUpdated = $lastUpdated;
    }

    /**
     * @return int
     */
    public function getLang()
    {
        return $this->lang;
    }

    /**
     * @param int $lang
     */
    public function setLang($lang)
    {
        $this->lang = $lang;
    }

    /**
     * @return boolean
     */
    public function isDeleted()
    {
        return $this->deleted;
    }

    /**
     * @param boolean $deleted
     */
    public function setDeleted($deleted)
    {
        $this->deleted = $deleted;
    }

    /**
     * @return int
     */
    public function getDifficulty()
    {
        return $this->difficulty;
    }

    /**
     * @param int $difficulty
     */
    public function setDifficulty($difficulty)
    {
        $this->difficulty = $difficulty;
    }
}
