1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/models/Forum_Thread.php

14 lines
515 B
PHP
Raw Normal View History

<?php
class Forum_Thread extends Doctrine_Record {
public function setTableDefinition() {
$this->hasColumn('board_id', 'integer', 10);
$this->hasColumn('updated', 'integer', 10);
$this->hasColumn('closed', 'integer', 1);
}
public function setUp() {
$this->hasOne('Forum_Board as Board', array('local' => 'board_id', 'foreign' => 'id', 'onDelete' => 'CASCADE'));
$this->hasMany('Forum_Entry as Entries', array('local' => 'id', 'foreign' => 'thread_id'));
}
}