<?php
/**
 * Created by PhpStorm.
 * User: VITAS
 * Date: 10.03.2016
 * Time: 01:04
 */

// src/AppBundle/Entity/Reviews.php

namespace AppBundle\Entity;

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

/**
 * @ORM\Entity
 * @ORM\Table(name="reviews")
 */
class Reviews
{
    /**
     * @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\User")
     * @ORM\JoinTable(name="reviews_users",
     *      joinColumns={@ORM\JoinColumn(name="review_id", referencedColumnName="id")},
     *      inverseJoinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")}
     * )
     */
    protected $owner;

    /**
     * @ORM\ManyToMany(targetEntity="AppBundle\Entity\Gversions")
     * @ORM\JoinTable(name="reviews_gversions",
     *      joinColumns={@ORM\JoinColumn(name="reviews_id", referencedColumnName="id")},
     *      inverseJoinColumns={@ORM\JoinColumn(name="gversion_id", referencedColumnName="id")}
     * )
     */
    protected $gversion;

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

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

    /**
     * @ORM\Column(type="text")
     */
    protected $content;

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

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

    /**
     * @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 getOwner()
    {
        return $this->owner;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    /**
     * Add owner
     *
     * @param \AppBundle\Entity\User $owner
     *
     * @return Reviews
     */
    public function addOwner(\AppBundle\Entity\User $owner)
    {
        $this->owner[] = $owner;

        return $this;
    }

    /**
     * Remove owner
     *
     * @param \AppBundle\Entity\User $owner
     */
    public function removeOwner(\AppBundle\Entity\User $owner)
    {
        $this->owner->removeElement($owner);
    }

    /**
     * Add gversion
     *
     * @param \AppBundle\Entity\Gversions $gversion
     *
     * @return Reviews
     */
    public function addGversion(\AppBundle\Entity\Gversions $gversion)
    {
        $this->gversion[] = $gversion;

        return $this;
    }

    /**
     * Remove gversion
     *
     * @param \AppBundle\Entity\Gversions $gversion
     */
    public function removeGversion(\AppBundle\Entity\Gversions $gversion)
    {
        $this->gversion->removeElement($gversion);
    }
}
