2007-09-02 14:24:49 +00:00
|
|
|
<?php
|
|
|
|
class Phonenumber extends Doctrine_Record
|
|
|
|
{
|
2008-02-03 21:29:57 +00:00
|
|
|
public static function initMetadata($class)
|
2007-09-02 14:24:49 +00:00
|
|
|
{
|
2008-02-03 21:29:57 +00:00
|
|
|
$class->setColumn('phonenumber', 'string',20);
|
|
|
|
$class->setColumn('entity_id', 'integer');
|
|
|
|
|
|
|
|
$class->hasOne('Entity', array('local' => 'entity_id',
|
2007-09-02 14:24:49 +00:00
|
|
|
'foreign' => 'id',
|
|
|
|
'onDelete' => 'CASCADE'));
|
2007-09-20 15:02:07 +00:00
|
|
|
|
2008-02-03 21:29:57 +00:00
|
|
|
$class->hasOne('Group', array('local' => 'entity_id',
|
2007-09-20 15:02:07 +00:00
|
|
|
'foreign' => 'id',
|
|
|
|
'onDelete' => 'CASCADE'));
|
|
|
|
|
2008-02-03 21:29:57 +00:00
|
|
|
$class->hasOne('User', array('local' => 'entity_id',
|
2007-09-20 15:02:07 +00:00
|
|
|
'foreign' => 'id',
|
|
|
|
'onDelete' => 'CASCADE'));
|
2007-09-02 14:24:49 +00:00
|
|
|
}
|
|
|
|
}
|