1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/tests/Doctrine/Tests/Models/CMS/CmsUser.php

48 lines
1.0 KiB
PHP
Raw Normal View History

2008-02-09 02:20:35 +03:00
<?php
namespace Doctrine\Tests\Models\CMS;
/**
* @DoctrineEntity(tableName="cms_users")
*/
class CmsUser
2008-02-09 02:20:35 +03:00
{
/**
* @DoctrineId
* @DoctrineColumn(type="integer")
* @DoctrineIdGenerator("auto")
*/
public $id;
/**
* @DoctrineColumn(type="varchar", length=50)
*/
public $status;
/**
* @DoctrineColumn(type="varchar", length=255)
*/
public $username;
/**
* @DoctrineColumn(type="varchar", length=255)
*/
public $name;
/**
* @DoctrineOneToMany(targetEntity="Doctrine\Tests\Models\CMS\CmsPhonenumber",
mappedBy="user", cascade={"save"})
*/
public $phonenumbers;
/**
* @DoctrineOneToMany(targetEntity="Doctrine\Tests\Models\CMS\CmsArticle", mappedBy="user")
*/
public $articles;
/**
* Adds a phonenumber to the user.
*
* @param <type> $phone
*/
public function addPhonenumber(CmsPhonenumber $phone) {
$this->phonenumbers[] = $phone;
$phone->user = $this;
}
}