1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tests_old/models/Forum_Board.php

12 lines
483 B
PHP

<?php
class Forum_Board extends Doctrine_Entity {
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'));
}
}