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
|
|
|
* @DoctrineInheritanceType("joined")
|
2009-01-07 17:46:02 +00:00
|
|
|
* @DoctrineDiscriminatorColumn(name="dtype", type="varchar", length=20)
|
2009-01-22 19:38:10 +00:00
|
|
|
* @DoctrineDiscriminatorMap({
|
|
|
|
"user" = "Doctrine\Tests\Models\Forum\ForumUser",
|
|
|
|
"admin" = "Doctrine\Tests\Models\Forum\ForumAdministrator"})
|
|
|
|
* @DoctrineSubclasses({"Doctrine\Tests\Models\Forum\ForumAdministrator"})
|
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
|
|
|
|
* @DoctrineIdGenerator("auto")
|
|
|
|
*/
|
2008-12-18 14:08:11 +00:00
|
|
|
public $id;
|
2009-01-05 17:25:56 +00:00
|
|
|
/**
|
2009-01-07 17:46:02 +00:00
|
|
|
* @DoctrineColumn(type="varchar", 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;
|
2008-02-11 17:08:22 +00:00
|
|
|
}
|