<?php

/**
 * BaseGuest
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $gender_id
 * @property string $title
 * @property string $name
 * @property string $surname
 * @property string $university
 * @property integer $index_nr
 * @property string $telephone
 * @property string $email
 * @property Gender $Gender
 * @property Seat $Seat
 * 
 * @method integer getGenderId()   Returns the current record's "gender_id" value
 * @method string  getTitle()      Returns the current record's "title" value
 * @method string  getName()       Returns the current record's "name" value
 * @method string  getSurname()    Returns the current record's "surname" value
 * @method string  getUniversity() Returns the current record's "university" value
 * @method integer getIndexNr()    Returns the current record's "index_nr" value
 * @method string  getTelephone()  Returns the current record's "telephone" value
 * @method string  getEmail()      Returns the current record's "email" value
 * @method Gender  getGender()     Returns the current record's "Gender" value
 * @method Seat    getSeat()       Returns the current record's "Seat" value
 * @method Guest   setGenderId()   Sets the current record's "gender_id" value
 * @method Guest   setTitle()      Sets the current record's "title" value
 * @method Guest   setName()       Sets the current record's "name" value
 * @method Guest   setSurname()    Sets the current record's "surname" value
 * @method Guest   setUniversity() Sets the current record's "university" value
 * @method Guest   setIndexNr()    Sets the current record's "index_nr" value
 * @method Guest   setTelephone()  Sets the current record's "telephone" value
 * @method Guest   setEmail()      Sets the current record's "email" value
 * @method Guest   setGender()     Sets the current record's "Gender" value
 * @method Guest   setSeat()       Sets the current record's "Seat" value
 * 
 * @package    balsit
 * @subpackage model
 * @author     Krzysiek Wesołowski
 * @version    SVN: $Id: Builder.php 6820 2009-11-30 17:27:49Z jwage $
 */
abstract class BaseGuest extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('guest');
        $this->hasColumn('gender_id', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('title', 'string', 255, array(
             'type' => 'string',
             'notnull' => false,
             'length' => '255',
             ));
        $this->hasColumn('name', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => '255',
             ));
        $this->hasColumn('surname', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => '255',
             ));
        $this->hasColumn('university', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => '255',
             ));
        $this->hasColumn('index_nr', 'integer', null, array(
             'type' => 'integer',
             'notnull' => false,
             ));
        $this->hasColumn('telephone', 'string', 255, array(
             'type' => 'string',
             'notnull' => false,
             'length' => '255',
             ));
        $this->hasColumn('email', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => '255',
             ));

        $this->option('type', 'INNODB');
        $this->option('collate', 'utf8_general_ci');
        $this->option('charset', 'utf8');
    }

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

        $this->hasOne('Seat', array(
             'local' => 'id',
             'foreign' => 'guest_id',
             'onDelete' => 'CASCADE'));

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