<?php

	include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );

	/**
	 * represents a permission from the database
	 *
	 * \ingroup DAO
	 */	 	
	class UserPermission extends DbObject 
	{

    	var $_userId;
        var $_blogId;
        var $_permId;
        var $_id;

    	function UserPermission( $userId, $blogId, $permId, $id = -1 )
        {
			$this->DbObject();
        	$this->_userId = $userId;
            $this->_blogId = $blogId;
            $this->_permId = $permId;
            $this->_id     = $id;
			
			$this->_pk = "id";
			$this->_fields = Array (
				"blog_id" => "getBlogId",
				"user_id" => "getUserId",
				"permission_id" => "getPermissionId" 
			);
        }

        function getId()
        {
        	return $this->_id;
        }
		
		function setId( $id )
		{
			$this->_id = $id;
		}

        function getBlogId()
        {
        	return $this->_blogId;
        }
		
		function setBlogId( $blogId )
		{
			$this->_blogId = $blogId;
		}

        function getPermissionId()
        {
        	return $this->_permId;
        }
		
		function setPermissionId( $permId ) 
		{
			$this->_permId = $permId;
		}

        function getUserId()
        {
        	return $this->_userId;
        }
		
		function setUserId( $userId )
		{
			$this->_userId = $userId;
		}
    }
?>
