<?php

/**
 * BasePostImages
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $post_id
 * @property string $image
 * @property boolean $is_cover
 * @property Posts $Posts
 * 
 * @method integer    getPostId()   Returns the current record's "post_id" value
 * @method string     getImage()    Returns the current record's "image" value
 * @method boolean    getIsCover()  Returns the current record's "is_cover" value
 * @method Posts      getPosts()    Returns the current record's "Posts" value
 * @method PostImages setPostId()   Sets the current record's "post_id" value
 * @method PostImages setImage()    Sets the current record's "image" value
 * @method PostImages setIsCover()  Sets the current record's "is_cover" value
 * @method PostImages setPosts()    Sets the current record's "Posts" value
 * 
 * @package    classifieds
 * @subpackage model
 * @author     Sandip Sathavara <sandip.sathavara@gmail.com>
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BasePostImages extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('post_images');
        $this->hasColumn('post_id', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('image', 'string', null, array(
             'type' => 'string',
             'notnull' => true,
             ));
        $this->hasColumn('is_cover', 'boolean', null, array(
             'type' => 'boolean',
             'default' => 0,
             ));

        $this->option('type', 'InnoDB');
        $this->option('collate', 'utf8_unicode_ci');
        $this->option('charset', 'utf8');
    }

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

        $timestampable0 = new Doctrine_Template_Timestampable();
        $this->actAs($timestampable0);
    }
}