1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/tests/Doctrine/Tests/Models/CMS/CmsPhonenumber.php

27 lines
474 B
PHP
Raw Normal View History

<?php
namespace Doctrine\Tests\Models\CMS;
/**
* @Entity
* @Table(name="cms_phonenumbers")
*/
class CmsPhonenumber
{
/**
* @Column(type="string", length=50)
* @Id
*/
public $phonenumber;
/**
* @ManyToOne(targetEntity="CmsUser")
* @JoinColumn(name="user_id", referencedColumnName="id")
*/
public $user;
public function setUser(CmsUser $user) {
$this->user = $user;
$user->addPhonenumber($this);
}
}