<?php

namespace Application\Model;

use Ainias\Core\Model\StandardModel;
use Doctrine\ORM\Mapping as ORM;

/** @ORM\Entity(repositoryClass="Application\Model\Repository\RatingRepository")
 */
class Rating extends StandardModel
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @ORM\Column(type="integer")
     */
    protected $id;

    /**
     * @ORM\ManyToOne(targetEntity="\Application\Model\Level", inversedBy="ratings")
     * @ORM\JoinColumn(name="levelId", referencedColumnName="id")
     * @var Level
     */
    protected $level;

    /**
     * @ORM\ManyToOne(targetEntity="\Application\Model\AuthToken", inversedBy="ratings")
     * @ORM\JoinColumn(name="authTokenId", referencedColumnName="id")
     * @var AuthToken
     */
    protected $authToken;

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

    /**
     * Rating constructor.
     */
    public function __construct()
    {
        $this->id = null;
        $this->authToken = null;
        $this->level = null;
    }

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

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

    /**
     * @return Level
     */
    public function getLevel()
    {
        return $this->level;
    }

    /**
     * @param Level $level
     */
    public function setLevel($level)
    {
        $this->level = $level;
    }

    /**
     * @return AuthToken
     */
    public function getAuthToken()
    {
        return $this->authToken;
    }

    /**
     * @param AuthToken $authToken
     */
    public function setAuthToken($authToken)
    {
        $this->authToken = $authToken;
    }

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

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