2007-09-20 23:58:34 +04:00
|
|
|
<?php
|
2007-09-20 01:24:59 +04:00
|
|
|
class gnatUserTable { }
|
|
|
|
|
|
|
|
class gnatUser extends Doctrine_Record
|
|
|
|
{
|
|
|
|
public function setTableDefinition()
|
|
|
|
{
|
|
|
|
$this->hasColumn('name', 'string', 150);
|
2007-09-20 23:58:34 +04:00
|
|
|
$this->hasColumn('foreign_id', 'integer', 10, array ('unique' => true,));
|
2007-09-20 01:24:59 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
parent::setUp();
|
2007-09-20 23:58:34 +04:00
|
|
|
$this->hasOne('gnatEmail as Email', array('local'=> 'foreign_id', 'foreign'=>'id', 'onDelete'=>'CASCADE'));
|
2007-09-20 01:24:59 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|