<?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('SF_GUARD_USER', 'doctrine');

/**
 * BaseSF_GUARD_USER
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $first_name
 * @property string $last_name
 * @property string $email_address
 * @property string $username
 * @property string $algorithm
 * @property string $salt
 * @property string $password
 * @property boolean $is_active
 * @property boolean $is_super_admin
 * @property timestamp $last_login
 * @property timestamp $created_at
 * @property timestamp $updated_at
 * @property Doctrine_Collection $SF_GUARD_USER_PERMISSION
 * @property Doctrine_Collection $SF_GUARD_USER_GROUP
 * @property Doctrine_Collection $SF_GUARD_REMEMBER_KEY
 * @property Doctrine_Collection $SF_GUARD_FORGOT_PASSWORD
 * 
 * @method integer             getId()                       Returns the current record's "id" value
 * @method string              getFirstName()                Returns the current record's "first_name" value
 * @method string              getLastName()                 Returns the current record's "last_name" value
 * @method string              getEmailAddress()             Returns the current record's "email_address" value
 * @method string              getUsername()                 Returns the current record's "username" value
 * @method string              getAlgorithm()                Returns the current record's "algorithm" value
 * @method string              getSalt()                     Returns the current record's "salt" value
 * @method string              getPassword()                 Returns the current record's "password" value
 * @method boolean             getIsActive()                 Returns the current record's "is_active" value
 * @method boolean             getIsSuperAdmin()             Returns the current record's "is_super_admin" value
 * @method timestamp           getLastLogin()                Returns the current record's "last_login" value
 * @method timestamp           getCreatedAt()                Returns the current record's "created_at" value
 * @method timestamp           getUpdatedAt()                Returns the current record's "updated_at" value
 * @method Doctrine_Collection getSFGUARDUSERPERMISSION()    Returns the current record's "SF_GUARD_USER_PERMISSION" collection
 * @method Doctrine_Collection getSFGUARDUSERGROUP()         Returns the current record's "SF_GUARD_USER_GROUP" collection
 * @method Doctrine_Collection getSFGUARDREMEMBERKEY()       Returns the current record's "SF_GUARD_REMEMBER_KEY" collection
 * @method Doctrine_Collection getSFGUARDFORGOTPASSWORD()    Returns the current record's "SF_GUARD_FORGOT_PASSWORD" collection
 * @method SF_GUARD_USER       setId()                       Sets the current record's "id" value
 * @method SF_GUARD_USER       setFirstName()                Sets the current record's "first_name" value
 * @method SF_GUARD_USER       setLastName()                 Sets the current record's "last_name" value
 * @method SF_GUARD_USER       setEmailAddress()             Sets the current record's "email_address" value
 * @method SF_GUARD_USER       setUsername()                 Sets the current record's "username" value
 * @method SF_GUARD_USER       setAlgorithm()                Sets the current record's "algorithm" value
 * @method SF_GUARD_USER       setSalt()                     Sets the current record's "salt" value
 * @method SF_GUARD_USER       setPassword()                 Sets the current record's "password" value
 * @method SF_GUARD_USER       setIsActive()                 Sets the current record's "is_active" value
 * @method SF_GUARD_USER       setIsSuperAdmin()             Sets the current record's "is_super_admin" value
 * @method SF_GUARD_USER       setLastLogin()                Sets the current record's "last_login" value
 * @method SF_GUARD_USER       setCreatedAt()                Sets the current record's "created_at" value
 * @method SF_GUARD_USER       setUpdatedAt()                Sets the current record's "updated_at" value
 * @method SF_GUARD_USER       setSFGUARDUSERPERMISSION()    Sets the current record's "SF_GUARD_USER_PERMISSION" collection
 * @method SF_GUARD_USER       setSFGUARDUSERGROUP()         Sets the current record's "SF_GUARD_USER_GROUP" collection
 * @method SF_GUARD_USER       setSFGUARDREMEMBERKEY()       Sets the current record's "SF_GUARD_REMEMBER_KEY" collection
 * @method SF_GUARD_USER       setSFGUARDFORGOTPASSWORD()    Sets the current record's "SF_GUARD_FORGOT_PASSWORD" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseSF_GUARD_USER extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('SF_GUARD_USER');
        $this->hasColumn('id', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('first_name', 'string', 255, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 255,
             ));
        $this->hasColumn('last_name', 'string', 255, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 255,
             ));
        $this->hasColumn('email_address', 'string', 255, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 255,
             ));
        $this->hasColumn('username', 'string', 128, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('algorithm', 'string', 128, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '\'sha1\'',
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('salt', 'string', 128, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('password', 'string', 128, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('is_active', 'boolean', 1, array(
             'notnull' => false,
             'type' => 'boolean',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '\'1\'',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('is_super_admin', 'boolean', 1, array(
             'notnull' => false,
             'type' => 'boolean',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '\'0\'',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('last_login', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('created_at', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('updated_at', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('SF_GUARD_USER_PERMISSION', array(
             'local' => 'id',
             'foreign' => 'user_id'));

        $this->hasMany('SF_GUARD_USER_GROUP', array(
             'local' => 'id',
             'foreign' => 'user_id'));

        $this->hasMany('SF_GUARD_REMEMBER_KEY', array(
             'local' => 'id',
             'foreign' => 'user_id'));

        $this->hasMany('SF_GUARD_FORGOT_PASSWORD', array(
             'local' => 'id',
             'foreign' => 'user_id'));
    }
}