1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/tests_old/models/Forum_Board.php
2008-02-08 17:41:01 +00:00

12 lines
483 B
PHP

<?php
class Forum_Board extends Doctrine_Record {
public static function initMetadata($class) {
$class->setColumn('category_id', 'integer', 10);
$class->setColumn('name', 'string', 100);
$class->setColumn('description', 'string', 5000);
$class->hasOne('Forum_Category as Category', array('local' => 'category_id', 'foreign' => 'id'));
$class->hasMany('Forum_Thread as Threads', array('local' => 'id', 'foreign' => 'board_id'));
}
}