CmsPhonenumber.php 531B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Doctrine\Tests\Models\CMS;
  3. /**
  4. * @Entity
  5. * @Table(name="cms_phonenumbers")
  6. */
  7. class CmsPhonenumber
  8. {
  9. /**
  10. * @Id @Column(length=50)
  11. */
  12. public $phonenumber;
  13. /**
  14. * @ManyToOne(targetEntity="CmsUser", inversedBy="phonenumbers", cascade={"merge"})
  15. * @JoinColumn(name="user_id", referencedColumnName="id")
  16. */
  17. public $user;
  18. public function setUser(CmsUser $user) {
  19. $this->user = $user;
  20. }
  21. public function getUser() {
  22. return $this->user;
  23. }
  24. }