2013-11-04 15:40:51 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Doctrine\Tests\Models\DDC2775;
|
|
|
|
|
|
|
|
/**
|
2013-11-04 19:01:05 +04:00
|
|
|
* @Entity @Table(name="authorizations")
|
2013-11-04 15:40:51 +04:00
|
|
|
*/
|
|
|
|
class Authorization
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @Id @Column(type="integer")
|
|
|
|
* @GeneratedValue
|
|
|
|
*/
|
|
|
|
private $id;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ManyToOne(targetEntity="User", inversedBy="authorizations")
|
|
|
|
*/
|
|
|
|
private $user;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ManyToOne(targetEntity="Role", inversedBy="authorizations")
|
|
|
|
*/
|
|
|
|
private $role;
|
|
|
|
|
|
|
|
public function getId()
|
|
|
|
{
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setUser(User $user)
|
|
|
|
{
|
|
|
|
$this->user = $user;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setRole(Role $role)
|
|
|
|
{
|
|
|
|
$this->role = $role;
|
|
|
|
}
|
|
|
|
}
|