1
0
mirror of synced 2025-01-09 10:37:09 +03:00
doctrine2/sandbox/models/generated/BaseUser.class.php
2007-10-18 04:03:33 +00:00

51 lines
1.6 KiB
PHP

<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
abstract class BaseUser extends Entity
{
public function setTableDefinition()
{
$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'));
}
public function setUp()
{
$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'));
}
}