<?php

namespace OilDatabase\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Role
 */
class UserRole
{
    /**
     * @var integer
     */
    private $id;

    /**
     * @var \OilDatabase\Entity\Role
     */
    private $role;

    /**
     * @var \OilDatabase\Entity\User
     */
    private $user;

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

    /**
     * Set user
     *
     * @param \OilDatabase\Entity\User $user
     * @return UserRole
     */
    public function seUser(\OilDatabase\Entity\User $user = null)
    {
        $this->user = $user;

        return $this;
    }

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

    /**
     * Set role
     *
     * @param \OilDatabase\Entity\Role $role
     * @return User
     */
    public function setRole(\OilDatabase\Entity\Role $role = null)
    {
        $this->role = $role;

        return $this;
    }

    /**
     * Get role
     *
     * @return \OilDatabase\Entity\Role
     */
    public function getRole()
    {
        return $this->role;
    }
}

