2008-05-06 13:41:22 +00:00
|
|
|
<?php
|
2009-01-05 17:25:56 +00:00
|
|
|
|
2009-01-22 19:38:10 +00:00
|
|
|
namespace Doctrine\Tests\Models\CMS;
|
|
|
|
|
2009-01-05 17:25:56 +00:00
|
|
|
/**
|
2009-05-29 10:23:13 +00:00
|
|
|
* @Entity
|
|
|
|
* @Table(name="cms_phonenumbers")
|
2009-01-05 17:25:56 +00:00
|
|
|
*/
|
2009-01-09 16:25:06 +00:00
|
|
|
class CmsPhonenumber
|
2008-05-06 13:41:22 +00:00
|
|
|
{
|
2009-01-05 17:25:56 +00:00
|
|
|
/**
|
2010-04-10 00:00:36 +02:00
|
|
|
* @Id @Column(length=50)
|
2009-01-05 17:25:56 +00:00
|
|
|
*/
|
2008-12-18 14:08:11 +00:00
|
|
|
public $phonenumber;
|
2009-01-05 17:25:56 +00:00
|
|
|
/**
|
2010-07-29 22:27:00 +02:00
|
|
|
* @ManyToOne(targetEntity="CmsUser", inversedBy="phonenumbers", cascade={"merge"})
|
2009-05-29 10:23:13 +00:00
|
|
|
* @JoinColumn(name="user_id", referencedColumnName="id")
|
2009-01-05 17:25:56 +00:00
|
|
|
*/
|
2008-12-18 14:08:11 +00:00
|
|
|
public $user;
|
2009-01-09 16:25:06 +00:00
|
|
|
|
|
|
|
public function setUser(CmsUser $user) {
|
|
|
|
$this->user = $user;
|
2009-07-02 11:48:44 +00:00
|
|
|
}
|
2011-12-19 22:56:19 +01:00
|
|
|
|
2009-07-02 11:48:44 +00:00
|
|
|
public function getUser() {
|
|
|
|
return $this->user;
|
2009-01-09 16:25:06 +00:00
|
|
|
}
|
2008-05-06 13:41:22 +00:00
|
|
|
}
|