1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/tests/Doctrine/Tests/Models/CMS/CmsArticle.php

39 lines
703 B
PHP
Raw Normal View History

2008-05-07 01:03:31 +04:00
<?php
namespace Doctrine\Tests\Models\CMS;
/**
* @Entity
* @Table(name="cms_articles")
*/
class CmsArticle
2008-05-07 01:03:31 +04:00
{
/**
* @Id
* @Column(type="integer")
* @GeneratedValue(strategy="AUTO")
*/
public $id;
/**
* @Column(type="string", length=255)
*/
public $topic;
/**
* @Column(type="string")
*/
public $text;
/**
* @ManyToOne(targetEntity="CmsUser")
* @JoinColumn(name="user_id", referencedColumnName="id")
*/
public $user;
/**
* @OneToMany(targetEntity="CmsComment", mappedBy="article")
*/
public $comments;
public function setAuthor(CmsUser $author) {
$this->user = $author;
}
2008-05-07 01:03:31 +04:00
}