2008-02-11 20:08:22 +03:00
|
|
|
<?php
|
|
|
|
|
2009-01-22 22:38:10 +03:00
|
|
|
namespace Doctrine\Tests\Models\Forum;
|
2008-07-21 00:13:24 +04:00
|
|
|
|
2009-01-05 20:25:56 +03:00
|
|
|
/**
|
2009-05-29 14:23:13 +04:00
|
|
|
* @Entity
|
|
|
|
* @Table(name="forum_users")
|
2009-01-05 20:25:56 +03:00
|
|
|
*/
|
2008-12-18 17:08:11 +03:00
|
|
|
class ForumUser
|
2008-02-11 20:08:22 +03:00
|
|
|
{
|
2009-01-05 20:25:56 +03:00
|
|
|
/**
|
2009-05-29 14:23:13 +04:00
|
|
|
* @Column(type="integer")
|
|
|
|
* @Id
|
2009-06-07 21:20:37 +04:00
|
|
|
* @GeneratedValue(strategy="AUTO")
|
2009-01-05 20:25:56 +03:00
|
|
|
*/
|
2008-12-18 17:08:11 +03:00
|
|
|
public $id;
|
2009-01-05 20:25:56 +03:00
|
|
|
/**
|
2009-05-29 14:23:13 +04:00
|
|
|
* @Column(type="string", length=50)
|
2009-01-05 20:25:56 +03:00
|
|
|
*/
|
2008-12-18 17:08:11 +03:00
|
|
|
public $username;
|
2009-01-05 20:25:56 +03:00
|
|
|
/**
|
2009-05-29 14:23:13 +04:00
|
|
|
* @OneToOne(targetEntity="ForumAvatar", cascade={"save"})
|
|
|
|
* @JoinColumn(name="avatar_id", referencedColumnName="id")
|
2009-01-05 20:25:56 +03:00
|
|
|
*/
|
2008-12-18 17:08:11 +03:00
|
|
|
public $avatar;
|
2009-05-28 15:13:12 +04:00
|
|
|
|
|
|
|
public function getId() {
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getUsername() {
|
|
|
|
return $this->username;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getAvatar() {
|
|
|
|
return $this->avatar;
|
|
|
|
}
|
|
|
|
|
2009-07-08 12:43:50 +04:00
|
|
|
public function setAvatar(ForumAvatar $avatar) {
|
2009-05-28 15:13:12 +04:00
|
|
|
$this->avatar = $avatar;
|
|
|
|
}
|
2009-07-08 12:43:50 +04:00
|
|
|
}
|