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