2008-05-06 17:41:22 +04:00
|
|
|
<?php
|
2008-09-12 14:40:23 +04:00
|
|
|
class CmsPhonenumber extends Doctrine_ORM_Entity
|
2008-05-06 17:41:22 +04:00
|
|
|
{
|
2008-07-21 00:13:24 +04:00
|
|
|
#protected $user_id;
|
|
|
|
#protected $phonenumber;
|
|
|
|
|
|
|
|
public static function initMetadata($mapping)
|
|
|
|
{
|
|
|
|
$mapping->mapField(array(
|
|
|
|
'fieldName' => 'user_id',
|
|
|
|
'type' => 'integer',
|
|
|
|
'length' => 4
|
|
|
|
));
|
|
|
|
$mapping->mapField(array(
|
|
|
|
'fieldName' => 'phonenumber',
|
|
|
|
'type' => 'string',
|
|
|
|
'length' => 50,
|
|
|
|
'id' => true
|
|
|
|
));
|
2008-08-22 13:05:14 +04:00
|
|
|
|
|
|
|
$mapping->mapManyToOne(array(
|
|
|
|
'fieldName' => 'user',
|
|
|
|
'targetEntity' => 'CmsUser',
|
|
|
|
'joinColumns' => array('user_id' => 'id')
|
|
|
|
));
|
2008-07-21 00:13:24 +04:00
|
|
|
}
|
2008-05-06 17:41:22 +04:00
|
|
|
}
|