<?php

namespace Neag\MainBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Log
 *
 * @ORM\Table(name="neag_log", options={"collate"="utf8_general_ci"}, indexes={@ORM\Index(name="scope_idx", columns={"scope"}), @ORM\Index(name="ip_idx", columns={"ip"}), @ORM\Index(name="cookie_id_idx", columns={"cookie_id"}), @ORM\Index(name="time_idx", columns={"time"})})
 * @ORM\Entity
 */
class Log
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="bigint", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;
    /**
     * @var integer
     * 
     * @var \DebriDv\MainBundle\Entity\User
     * @ORM\ManyToOne(targetEntity="User")
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="SET NULL") 
     */ 
    private $user;
    
    /**
     * @var string
     *
     * @ORM\Column(name="scope", type="string", length=255, nullable=true)
     */
    private $scope;

    /**
     * @var string
     *
     * @ORM\Column(name="text", type="text", nullable=false)
     */
    private $text;

    /**
     * @var string
     *
     * @ORM\Column(name="ip", type="string", length=255, nullable=true)
     */
    private $ip;

    /**
     * @var string
     *
     * @ORM\Column(name="cookie_id", type="string", length=255, nullable=true)
     */
    private $cookieId;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="time", type="datetime", nullable=true)
     */
    private $time; 

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }
    
    /**
     * Set user
     *
     * @param \DebriDv\MainBundle\Entity\User $user
     * @return UserSession
     */
    public function setUser(\DebriDv\MainBundle\Entity\User $user = null)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \DebriDv\MainBundle\Entity\User 
     */
    public function getUser()
    {
        return $this->user;
    } 

    /**
     * Set scope
     *
     * @param string $scope
     * @return Feedback
     */
    public function setScope($scope)
    {
        $this->scope = $scope;

        return $this;
    }

    /**
     * Get scope
     *
     * @return string 
     */
    public function getScope()
    {
        return $this->scope;
    }

    /**
     * Set text
     *
     * @param string $text
     * @return Feedback
     */
    public function setText($text)
    {
        $this->text = $text;

        return $this;
    }

    /**
     * Get text
     *
     * @return string 
     */
    public function getText()
    {
        return $this->text;
    }  

    /**
     * Set ip
     *
     * @param string $ip
     * @return Feedback
     */
    public function setIp($ip)
    {
        $this->ip = $ip;

        return $this;
    }

    /**
     * Get ip
     *
     * @return string 
     */
    public function getIp()
    {
        return $this->ip;
    }

    /**
     * Set cookieId
     *
     * @param string $cookieId
     * @return Feedback
     */
    public function setCookieId($cookieId)
    {
        $this->cookieId = $cookieId;

        return $this;
    }

    /**
     * Get cookieId
     *
     * @return string 
     */
    public function getCookieId()
    {
        return $this->cookieId;
    }

    /**
     * Set time
     *
     * @param \DateTime $time
     * @return Feedback
     */
    public function setTime($time)
    {
        $this->time = $time;

        return $this;
    }

    /**
     * Get time
     *
     * @return \DateTime 
     */
    public function getTime()
    {
        return $this->time;
    }     
       
}
