<?php
/**
 * Created by PhpStorm.
 * User: VITAS
 * Date: 09.03.2016
 * Time: 18:40
 */

// src/AppBundle/Entity/Games.php

namespace AppBundle\Entity;

use Gedmo\Mapping\Annotation as Gedmo; // gedmo annotations
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="games")
 */
class Games
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @Gedmo\Timestampable(on="create")
     * @ORM\Column(type="datetime")
     */
    private $created;

    /**
     * @ORM\ManyToMany(targetEntity="AppBundle\Entity\Publishers")
     * @ORM\JoinTable(name="games_publishers",
     *      joinColumns={@ORM\JoinColumn(name="game_id", referencedColumnName="id")},
     *      inverseJoinColumns={@ORM\JoinColumn(name="publisher_id", referencedColumnName="id")}
     * )
     */
    protected $publisher;

    /**
     * @ORM\ManyToMany(targetEntity="AppBundle\Entity\Themes")
     * @ORM\JoinTable(name="games_themes",
     *      joinColumns={@ORM\JoinColumn(name="game_id", referencedColumnName="id")},
     *      inverseJoinColumns={@ORM\JoinColumn(name="theme_id", referencedColumnName="id")}
     * )
     */
    protected $gtheme;

    /**
     * @ORM\Column(type="string", length=100)
     */
    protected $gname;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @ORM\Column(type="string", length=100)
     */
    protected $boxart;

    /**
     * @ORM\Column(type="string", length=100)
     */
    protected $glink;



    public function __construct()
    {
        parent::__construct();
        // your own logic
    }

    /**
     * Add publisher
     *
     * @param \AppBundle\Entity\Publishers $publisher
     *
     * @return Games
     */
    public function addPublisher(\AppBundle\Entity\Publishers $publisher)
    {
        $this->publisher[] = $publisher;

        return $this;
    }

    /**
     * Remove publisher
     *
     * @param \AppBundle\Entity\Publishers $publisher
     */
    public function removePublisher(\AppBundle\Entity\Publishers $publisher)
    {
        $this->publisher->removeElement($publisher);
    }

    /**
     * Add gtheme
     *
     * @param \AppBundle\Entity\Themes $gtheme
     *
     * @return Games
     */
    public function addGtheme(\AppBundle\Entity\Themes $gtheme)
    {
        $this->gtheme[] = $gtheme;

        return $this;
    }

    /**
     * Remove gtheme
     *
     * @param \AppBundle\Entity\Themes $gtheme
     */
    public function removeGtheme(\AppBundle\Entity\Themes $gtheme)
    {
        $this->gtheme->removeElement($gtheme);
    }
}
