2007-09-02 18:24:49 +04:00
|
|
|
<?php
|
|
|
|
class Forum_Board extends Doctrine_Record {
|
2008-02-04 00:29:57 +03:00
|
|
|
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'));
|
2007-09-02 18:24:49 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|