jablonka.czprosek.czf

freenet-router

Subversion Repositories:
[/] [trunk/] [freenet-router/] [var/] [www/] [freenet-router/] [Framework/] [Libraries/] [Security/] [Model/] [MySQL/] [User.php] - Rev 2

Compare with Previous - Blame - Download


<?php

namespace Phem\Libraries\Security\Model\MySQL;

use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\JoinTable;
use Doctrine\ORM\Mapping\ManyToMany;
use Phem\Libraries\Security\Model\Common\User as CommonUser;

/**
 * @Entity @Table(name="admin_user") 
 */
class User extends CommonUser
{

    /** @Id @Column(type="integer") @GeneratedValue */
    protected $id;

    /** @Column(type="string") */
    protected $username;

    /** @Column(type="string") */
    protected $name;

    /** @Column(type="string") */
    protected $surname;

    /** @Column(type="string") */
    protected $password;

    /** @Column(type="string") */
    protected $email;

    /** @Column(type="blob") */
    protected $photo;

    /**
     * @ManyToMany(targetEntity="Group")
     * @JoinTable(name="admin_membership",
     *      joinColumns={@JoinColumn(name="user", referencedColumnName="id")},
     *      inverseJoinColumns={@JoinColumn(name="groupId", referencedColumnName="id")}
     *      )
     */
    protected $groups;

    public function getGroups()
    {
        return $this->groups;
    }

    public function setGroups($groups)
    {
        $this->groups = $groups;
    }

    public function getPhoto()
    {
        return $this->photo;
    }

    public function setPhoto($photo)
    {
        $this->photo = $photo;
    }

    public function getId()
    {
        return $this->id;
    }

    public function setId($id)
    {
        $this->id = $id;
    }

    public function getUsername()
    {
        return $this->username;
    }

    public function setUsername($username)
    {
        $this->username = $username;
    }

    public function getName()
    {
        return $this->name;
    }

    public function setName($name)
    {
        $this->name = $name;
    }

    public function getSurname()
    {
        return $this->surname;
    }

    public function setSurname($surname)
    {
        $this->surname = $surname;
    }

    public function getPassword()
    {
        return $this->password;
    }

    public function setPassword($password)
    {
        $this->password = $password;
    }

    public function getEmail()
    {
        return $this->email;
    }

    public function setEmail($email)
    {
        $this->email = $email;
    }

}

Powered by WebSVN 2.2.1