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")
|
2010-04-10 02:00:36 +04:00
|
|
|
* @Id @GeneratedValue
|
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-07-25 20:33:29 +04:00
|
|
|
* @OneToOne(targetEntity="ForumAvatar", cascade={"persist"})
|
2009-05-29 14:23:13 +04:00
|
|
|
* @JoinColumn(name="avatar_id", referencedColumnName="id")
|
2009-01-05 20:25:56 +03:00
|
|
|
*/
|
2008-12-18 17:08:11 +03:00
|
|
|
public $avatar;
|
2011-12-20 01:56:19 +04:00
|
|
|
|
2009-05-28 15:13:12 +04:00
|
|
|
public function getId() {
|
|
|
|
return $this->id;
|
|
|
|
}
|
2011-12-20 01:56:19 +04:00
|
|
|
|
2009-05-28 15:13:12 +04:00
|
|
|
public function getUsername() {
|
|
|
|
return $this->username;
|
|
|
|
}
|
2011-12-20 01:56:19 +04:00
|
|
|
|
2009-05-28 15:13:12 +04:00
|
|
|
public function getAvatar() {
|
|
|
|
return $this->avatar;
|
|
|
|
}
|
2011-12-20 01:56:19 +04:00
|
|
|
|
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
|
|
|
}
|