<?php

/**
 * RokGallery_Model_Base_Gallery
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $name
 * @property object $filetags
 * @property integer $width
 * @property integer $height
 * @property boolean $keep_aspect
 * @property boolean $force_image_size
 * @property integer $thumb_xsize
 * @property integer $thumb_ysize
 * @property string $thumb_background
 * @property boolean $thumb_keep_aspect
 * @property boolean $auto_publish
 * @property Doctrine_Collection $Slices
 * 
 * @package    RokGallery
 * @subpackage models
 * @author     RocketTheme LLC <support@rockettheme.com>
 * @version    SVN: $Id$
 */
abstract class RokGallery_Model_Base_Gallery extends RokCommon_Doctrine_Record
{
    public function setTableDefinition()
    {
        $this->setTableName('rokgallery_galleries');
        $this->hasColumn('id', 'integer', 4, array(
             'type' => 'integer',
             'unsigned' => true,
             'primary' => true,
             'unique' => true,
             'autoincrement' => true,
             'length' => '4',
             ));
        $this->hasColumn('name', 'string', 200, array(
             'type' => 'string',
             'notnull' => true,
             'length' => '200',
             ));
        $this->hasColumn('filetags', 'object', null, array(
             'type' => 'object',
             ));
        $this->hasColumn('width', 'integer', 4, array(
             'type' => 'integer',
             'unsigned' => true,
             'notnull' => true,
             'default' => 910,
             'length' => '4',
             ));
        $this->hasColumn('height', 'integer', 4, array(
             'type' => 'integer',
             'unsigned' => true,
             'notnull' => true,
             'default' => 500,
             'length' => '4',
             ));
        $this->hasColumn('keep_aspect', 'boolean', null, array(
             'type' => 'boolean',
             'default' => false,
             ));
        $this->hasColumn('force_image_size', 'boolean', null, array(
             'type' => 'boolean',
             'default' => false,
             ));
        $this->hasColumn('thumb_xsize', 'integer', 4, array(
             'type' => 'integer',
             'unsigned' => true,
             'notnull' => true,
             'default' => 190,
             'length' => '4',
             ));
        $this->hasColumn('thumb_ysize', 'integer', 4, array(
             'type' => 'integer',
             'unsigned' => true,
             'notnull' => true,
             'default' => 150,
             'length' => '4',
             ));
        $this->hasColumn('thumb_background', 'string', 12, array(
             'type' => 'string',
             'length' => '12',
             ));
        $this->hasColumn('thumb_keep_aspect', 'boolean', null, array(
             'type' => 'boolean',
             'default' => false,
             ));
        $this->hasColumn('auto_publish', 'boolean', null, array(
             'type' => 'boolean',
             'default' => false,
             ));


        $this->index('rokgallery_galleries_auto_publish', array(
             'fields' => 
             array(
              0 => 'auto_publish',
             ),
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('RokGallery_Model_Slice as Slices', array(
             'local' => 'id',
             'foreign' => 'gallery_id'));
    }
}