2008-02-11 17:08:22 +00:00
|
|
|
<?php
|
|
|
|
|
2009-01-04 16:15:32 +00:00
|
|
|
#namespace Doctrine\Tests\Models\Forum;
|
2008-07-20 20:13:24 +00:00
|
|
|
|
2008-12-18 14:08:11 +00:00
|
|
|
#use Doctrine\ORM\Entity;
|
2008-07-20 20:13:24 +00:00
|
|
|
|
2009-01-05 17:25:56 +00:00
|
|
|
/**
|
|
|
|
* @DoctrineEntity
|
|
|
|
* @DoctrineInheritanceType("joined")
|
2009-01-07 17:46:02 +00:00
|
|
|
* @DoctrineDiscriminatorColumn(name="dtype", type="varchar", length=20)
|
2009-01-05 17:25:56 +00:00
|
|
|
* @DoctrineDiscriminatorMap({"user" = "ForumUser", "admin" = "ForumAdministrator"})
|
|
|
|
* @DoctrineSubclasses({"ForumAdministrator"})
|
|
|
|
*/
|
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
|
|
|
/**
|
|
|
|
* @DoctrineOneToOne(
|
|
|
|
targetEntity="ForumAvatar",
|
|
|
|
joinColumns={"avatar_id" = "id"},
|
|
|
|
cascade={"save"})
|
|
|
|
*/
|
2008-12-18 14:08:11 +00:00
|
|
|
public $avatar;
|
2008-02-11 17:08:22 +00:00
|
|
|
}
|