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-02-04 19:35:36 +03:00
|
|
|
* @DoctrineEntity
|
|
|
|
* @DoctrineTable(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
|
|
|
/**
|
|
|
|
* @DoctrineColumn(type="integer")
|
|
|
|
* @DoctrineId
|
2009-03-30 23:43:05 +04:00
|
|
|
* @DoctrineGeneratedValue(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-13 19:19:27 +04:00
|
|
|
* @DoctrineColumn(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-02-04 19:35:36 +03:00
|
|
|
* @DoctrineOneToOne(targetEntity="ForumAvatar", cascade={"save"})
|
|
|
|
* @DoctrineJoinColumn(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;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setAvatar(CmsAvatar $avatar) {
|
|
|
|
$this->avatar = $avatar;
|
|
|
|
}
|
2008-02-11 20:08:22 +03:00
|
|
|
}
|