2007-09-02 18:24:49 +04:00
|
|
|
<?php
|
|
|
|
class Phonenumber extends Doctrine_Record
|
|
|
|
{
|
|
|
|
public function setTableDefinition()
|
|
|
|
{
|
|
|
|
$this->hasColumn('phonenumber', 'string',20);
|
|
|
|
$this->hasColumn('entity_id', 'integer');
|
|
|
|
}
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
$this->hasOne('Entity', array('local' => 'entity_id',
|
|
|
|
'foreign' => 'id',
|
|
|
|
'onDelete' => 'CASCADE'));
|
2007-09-20 19:02:07 +04:00
|
|
|
|
|
|
|
$this->hasOne('Group', array('local' => 'entity_id',
|
|
|
|
'foreign' => 'id',
|
|
|
|
'onDelete' => 'CASCADE'));
|
|
|
|
|
|
|
|
$this->hasOne('User', array('local' => 'entity_id',
|
|
|
|
'foreign' => 'id',
|
|
|
|
'onDelete' => 'CASCADE'));
|
2007-09-02 18:24:49 +04:00
|
|
|
}
|
|
|
|
}
|