1
0
mirror of synced 2024-12-13 06:46:03 +03:00
doctrine2/models/Forum_Entry.php

15 lines
665 B
PHP

<?php
class Forum_Entry extends Doctrine_Record {
public static function initMetadata($class) {
$class->setColumn('author', 'string', 50);
$class->setColumn('topic', 'string', 100);
$class->setColumn('message', 'string', 99999);
$class->setColumn('parent_entry_id', 'integer', 10);
$class->setColumn('thread_id', 'integer', 10);
$class->setColumn('date', 'integer', 10);
$class->hasOne('Forum_Entry as Parent', array('local' => 'id', 'foreign' => 'parent_entry_id'));
$class->hasOne('Forum_Thread as Thread', array('local' => 'thread_id', 'foreign' => 'id', 'onDelete' => 'CASCADE'));
}
}