1
0
mirror of synced 2025-01-07 09:37:11 +03:00
doctrine2/tests/models/forum/ForumUser.php

22 lines
719 B
PHP
Raw Normal View History

2008-02-11 20:08:22 +03:00
<?php
2008-02-11 22:56:26 +03:00
class ForumUser extends Doctrine_Record
2008-02-11 20:08:22 +03:00
{
public static function initMetadata($class)
{
// inheritance mapping
$class->setInheritanceType(Doctrine::INHERITANCETYPE_JOINED, array(
'discriminatorColumn' => 'dtype',
'discriminatorMap' => array(
2008-02-11 22:56:26 +03:00
1 => 'ForumUser',
2 => 'ForumAdministrator')
2008-02-11 20:08:22 +03:00
));
2008-02-11 22:56:26 +03:00
$class->setSubclasses(array('ForumAdministrator'));
2008-02-11 20:08:22 +03:00
// property mapping
$class->addMappedColumn('id', 'integer', 4, array(
'primary' => true,
'autoincrement' => true));
$class->addMappedColumn('username', 'string', 50);
}
}