<?php
namespace App\Model\Entities\GameData;

use App\Model\Entities\BaseEntity;
use App\Model\Interfaces\IGameData;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="game_data")
 * @ORM\InheritanceType(value="JOINED")
 * @ORM\DiscriminatorColumn(name="type")
 */
abstract class GameData extends BaseEntity implements IGameData
{
    /**
     * @ORM\ManyToOne(targetEntity="Studio")
     */
    protected $studio;

    /**
     * @var Publisher
     * @ORM\ManyToOne(targetEntity="Publisher")
     */
    protected $publisher;

    /**
     * @ORM\ManyToMany(targetEntity="Platform")
     * @ORM\JoinTable(name="games_platforms")
     */
    protected $platforms;

    /**
     * @ORM\Column(type="string")
     */
    protected $version;

    /**
     * @return Studio
     */
    public function getStudio() : Studio
    {
        return $this->studio;
    }

    /**
     * @param Studio $studio
     */
    public function setStudio(Studio $studio)
    {
        $this->studio = $studio;
    }

    /**
     * @return Publisher
     */
    public function getPublisher() : Publisher
    {
        return $this->publisher;
    }

    /**
     * @param Publisher $publisher
     */
    public function setPublisher(Publisher $publisher)
    {
        $this->publisher = $publisher;
    }

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

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