1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/tests/models/cms/CmsArticle.php

14 lines
457 B
PHP
Raw Normal View History

2008-05-07 01:03:31 +04:00
<?php
class CmsArticle extends Doctrine_Record
{
public static function initMetadata($class)
{
$class->mapColumn('id', 'integer', 4, array('primary' => true, 'autoincrement' => true));
$class->mapColumn('topic', 'string', 255);
$class->mapColumn('text', 'string');
$class->mapColumn('user_id', 'integer', 4);
2008-05-08 18:17:35 +04:00
$class->hasMany('CmsComment as comments', array(
'local' => 'id', 'foreign' => 'article_id'));
2008-05-07 01:03:31 +04:00
}
}