<?php

/**
 * RokGallery_Model_Base_FileTags
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $file_id
 * @property string $tag
 * @property RokGallery_Model_File $File
 * @property Doctrine_Collection $Slices
 * 
 * @package    RokGallery
 * @subpackage models
 * @author     RocketTheme LLC <support@rockettheme.com>
 * @version    SVN: $Id: FileTags.php 10871 2013-05-30 04:06:26Z btowles $
 */
abstract class RokGallery_Model_Base_FileTags extends RokCommon_Doctrine_Record
{
    public function setTableDefinition()
    {
        $this->setTableName('rokgallery_file_tags');
        $this->hasColumn('file_id', 'integer', 4, array(
             'type' => 'integer',
             'unsigned' => true,
             'primary' => true,
             'length' => '4',
             ));
        $this->hasColumn('tag', 'string', 50, array(
             'type' => 'string',
             'primary' => true,
             'length' => '50',
             ));


        $this->index('rokgallery_file_tags_file_id', array(
             'fields' => 
             array(
              0 => 'file_id',
             ),
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('RokGallery_Model_File as File', array(
             'local' => 'file_id',
             'foreign' => 'id',
             'onDelete' => 'CASCADE',
             'onUpdate' => 'CASCADE'));

        $this->hasMany('RokGallery_Model_Slice as Slices', array(
             'local' => 'file_id',
             'foreign' => 'file_id',
             'onDelete' => 'NO ACTION',
             'onUpdate' => 'NO ACTION'));
    }
}