<?php

namespace App\Model\Entities\GameData\Mmorpg;

use App\Model\Entities\BaseNamedRecord;
use App\Model\Entities\MmorpgGuild;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="character")
 */
class Character extends BaseNamedRecord
{
    /**
     * @ORM\Column(type="integer")
     */
    protected $level;

    /**
     * @var CharacterClass
     * @ORM\ManyToOne(targetEntity="CharacterClass")
     */
    protected $characterClass;

    /**
     * @var Faction
     * @ORM\ManyToOne(targetEntity="Faction")
     */
    protected $faction;

    /**
     * @var Server
     * @ORM\ManyToOne(targetEntity="Server")
     */
    protected $server;

    /**
     * @var MmorpgGuild
     * @ORM\ManyToOne(targetEntity="App\Model\Entities\MmorpgGuild")
     * @ORM\JoinColumn(nullable=true)
     */
    protected $guild;

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

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

    /**
     * @return CharacterClass
     */
    public function getCharacterClass() : CharacterClass
    {
        return $this->characterClass;
    }

    /**
     * @param CharacterClass $characterClass
     */
    public function setCharacterClass(CharacterClass $characterClass)
    {
        $this->characterClass = $characterClass;
    }

    /**
     * @return MmorpgGuild
     */
    public function getGuild() : MmorpgGuild
    {
        return $this->guild;
    }

    /**
     * @param MmorpgGuild $guild
     */
    public function setGuild(MmorpgGuild $guild)
    {
        $this->guild = $guild;
    }
}