<?php

/**
 * This class has been auto-generated by the Doctrine ORM Framework
 */
abstract class BaseThdVideo extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('thd_video');
        $this->hasColumn('id', 'integer', 4, array(
             'type' => 'integer',
             'unsigned' => '1',
             'primary' => true,
             'autoincrement' => true,
             'length' => '4',
             ));
        $this->hasColumn('file', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => '255',
             ));
        $this->hasColumn('title', 'string', 255, array(
             'type' => 'string',
             'length' => '255',
             ));
        $this->hasColumn('film_id', 'integer', 4, array(
             'type' => 'integer',
             'unsigned' => '1',
             'notnull' => true,
             'length' => '4',
             ));
    }

    public function setUp()
    {
        parent::setUp();
    $this->hasOne('ThdFilm', array(
             'local' => 'film_id',
             'foreign' => 'id',
             'onDelete' => 'CASCADE'));

        $this->hasMany('ThdSegment as segments', array(
             'local' => 'id',
             'foreign' => 'video_id'));
    }
}