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-02-04 16:35:36 +00:00
|
|
|
* @DoctrineEntity
|
|
|
|
* @DoctrineTable(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
|
|
|
/**
|
|
|
|
* @DoctrineColumn(type="integer")
|
|
|
|
* @DoctrineId
|
2009-03-30 19:43:05 +00:00
|
|
|
* @DoctrineGeneratedValue(strategy="auto")
|
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-13 15:19:27 +00:00
|
|
|
* @DoctrineColumn(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-02-04 16:35:36 +00:00
|
|
|
* @DoctrineOneToOne(targetEntity="ForumAvatar", cascade={"save"})
|
|
|
|
* @DoctrineJoinColumn(name="avatar_id", referencedColumnName="id")
|
2009-01-05 17:25:56 +00:00
|
|
|
*/
|
2008-12-18 14:08:11 +00:00
|
|
|
public $avatar;
|
2009-05-28 11:13:12 +00:00
|
|
|
|
|
|
|
public function getId() {
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getUsername() {
|
|
|
|
return $this->username;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getAvatar() {
|
|
|
|
return $this->avatar;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setAvatar(CmsAvatar $avatar) {
|
|
|
|
$this->avatar = $avatar;
|
|
|
|
}
|
2008-02-11 17:08:22 +00:00
|
|
|
}
|