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

17 lines
611 B
PHP

<?php
class Forum_Entry extends Doctrine_Record {
public function setTableDefinition() {
$this->hasColumn('author', 'string', 50);
$this->hasColumn('topic', 'string', 100);
$this->hasColumn('message', 'string', 99999);
$this->hasColumn('parent_entry_id', 'integer', 10);
$this->hasColumn('thread_id', 'integer', 10);
$this->hasColumn('date', 'integer', 10);
}
public function setUp() {
$this->hasOne('Forum_Entry as Parent', 'Forum_Entry.parent_entry_id');
$this->hasOne('Forum_Thread as Thread', 'Forum_Entry.thread_id');
}
}