2008-02-08 23:20:35 +00:00
|
|
|
<?php
|
|
|
|
class CmsUser extends Doctrine_Record
|
|
|
|
{
|
|
|
|
public static function initMetadata($class)
|
|
|
|
{
|
2008-02-16 19:10:16 +00:00
|
|
|
$class->mapColumn('id', 'integer', 4, array('primary' => true, 'autoincrement' => true));
|
|
|
|
$class->mapColumn('username', 'string', 255);
|
|
|
|
$class->mapColumn('name', 'string', 255);
|
2008-05-06 13:41:22 +00:00
|
|
|
|
|
|
|
$class->hasMany('CmsPhonenumber as phonenumbers', array(
|
|
|
|
'local' => 'id', 'foreign' => 'user_id'));
|
2008-05-06 21:03:31 +00:00
|
|
|
$class->hasMany('CmsArticle as articles', array(
|
|
|
|
'local' => 'id', 'foreign' => 'user_id'));
|
2008-02-08 23:20:35 +00:00
|
|
|
}
|
2008-02-15 00:57:34 +00:00
|
|
|
}
|