1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/tests/models/cms/CmsUser.php
2008-05-17 12:22:24 +00:00

17 lines
587 B
PHP

<?php
class CmsUser extends Doctrine_Entity
{
public static function initMetadata($class)
{
$class->mapColumn('id', 'integer', 4, array('primary' => true, 'autoincrement' => true));
$class->mapColumn('status', 'string', 50);
$class->mapColumn('username', 'string', 255);
$class->mapColumn('name', 'string', 255);
$class->hasMany('CmsPhonenumber as phonenumbers', array(
'local' => 'id', 'foreign' => 'user_id'));
$class->hasMany('CmsArticle as articles', array(
'local' => 'id', 'foreign' => 'user_id'));
}
}