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

16 lines
538 B
PHP
Raw Normal View History

2008-02-09 02:20:35 +03:00
<?php
class CmsUser extends Doctrine_Record
{
public static function initMetadata($class)
{
2008-02-16 22:10:16 +03:00
$class->mapColumn('id', 'integer', 4, array('primary' => true, 'autoincrement' => true));
$class->mapColumn('username', 'string', 255);
$class->mapColumn('name', 'string', 255);
$class->hasMany('CmsPhonenumber as phonenumbers', array(
'local' => 'id', 'foreign' => 'user_id'));
2008-05-07 01:03:31 +04:00
$class->hasMany('CmsArticle as articles', array(
'local' => 'id', 'foreign' => 'user_id'));
2008-02-09 02:20:35 +03:00
}
}