2007-10-15 23:34:48 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This class has been auto-generated by the Doctrine ORM Framework
|
|
|
|
*/
|
2007-10-18 08:03:33 +04:00
|
|
|
abstract class BaseUser extends Entity
|
2007-10-15 23:34:48 +04:00
|
|
|
{
|
|
|
|
|
|
|
|
public function setTableDefinition()
|
|
|
|
{
|
2007-10-18 08:03:33 +04:00
|
|
|
$this->setTableName('user');
|
|
|
|
$this->hasColumn('id', 'integer', 11, array('primary' => true,
|
|
|
|
'autoincrement' => true));
|
|
|
|
|
|
|
|
$this->hasColumn('username', 'string', 255);
|
|
|
|
|
|
|
|
$this->hasColumn('hair_color', 'string', 255);
|
|
|
|
$this->hasColumn('contact_id', 'integer', 11);
|
|
|
|
|
|
|
|
$this->index('name_x', array('fields' => array('username' => array( 'sorting' => 'ASC', 'length' => '11', 'primary' => true, ), ), 'type' => 'unique'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-15 23:34:48 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
public function setUp()
|
|
|
|
{
|
2007-10-18 08:03:33 +04:00
|
|
|
$this->hasOne('Contact', array('local' => 'contact_id',
|
|
|
|
'foreign' => 'id'));
|
|
|
|
|
|
|
|
$this->hasMany('Car as Cars', array('refClass' => 'UserCar',
|
|
|
|
'local' => 'user_id',
|
|
|
|
'foreign' => 'car_id'));
|
|
|
|
|
|
|
|
$this->hasMany('Group as Groups', array('refClass' => 'UserGroup',
|
|
|
|
'local' => 'user_id',
|
|
|
|
'foreign' => 'group_id'));
|
|
|
|
|
|
|
|
$this->hasOne('Dog', array('local' => 'id',
|
|
|
|
'foreign' => 'user_id'));
|
|
|
|
|
|
|
|
$this->hasMany('SelfReference as SelfReference1', array('local' => 'id',
|
|
|
|
'foreign' => 'user_id1'));
|
|
|
|
|
|
|
|
$this->hasMany('SelfReference as SelfReference2', array('local' => 'id',
|
|
|
|
'foreign' => 'user_id2'));
|
|
|
|
|
2007-10-15 23:34:48 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|