<?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('PollQuestion', 'doctrine');

/**
 * BasePollQuestion
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $poll_id
 * @property string $question
 * @property integer $sort_order
 * @property Poll $Poll
 * @property Doctrine_Collection $PollResults
 * 
 * @method integer             getId()          Returns the current record's "id" value
 * @method integer             getPollId()      Returns the current record's "poll_id" value
 * @method string              getQuestion()    Returns the current record's "question" value
 * @method integer             getSortOrder()   Returns the current record's "sort_order" value
 * @method Poll                getPoll()        Returns the current record's "Poll" value
 * @method Doctrine_Collection getPollResults() Returns the current record's "PollResults" collection
 * @method PollQuestion        setId()          Sets the current record's "id" value
 * @method PollQuestion        setPollId()      Sets the current record's "poll_id" value
 * @method PollQuestion        setQuestion()    Sets the current record's "question" value
 * @method PollQuestion        setSortOrder()   Sets the current record's "sort_order" value
 * @method PollQuestion        setPoll()        Sets the current record's "Poll" value
 * @method PollQuestion        setPollResults() Sets the current record's "PollResults" collection
 * 
 * @package    mongolcom
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BasePollQuestion extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('poll_question');
        $this->hasColumn('id', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'autoincrement' => true,
             'length' => 4,
             ));
        $this->hasColumn('poll_id', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 4,
             ));
        $this->hasColumn('question', 'string', 255, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 255,
             ));
        $this->hasColumn('sort_order', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 4,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('Poll', array(
             'local' => 'poll_id',
             'foreign' => 'id'));

        $this->hasMany('PollResults', array(
             'local' => 'id',
             'foreign' => 'question_id'));
    }
}