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