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

/**
 * BaseUSUARIO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property string $username
 * @property string $pass
 * @property integer $id_perfil
 * @property string $estado
 * @property integer $id_tipo_doc
 * @property string $num_doc
 * @property string $nombre
 * @property string $apellido
 * @property string $email
 * @property ESTADO_USUARIO $ESTADO_USUARIO
 * @property PERFIL $PERFIL
 * @property TIPO_DOCUMENTO $TIPO_DOCUMENTO
 * @property Doctrine_Collection $ACTIVIDAD
 * @property Doctrine_Collection $ACTIVIDAD_11
 * 
 * @method string              getUsername()       Returns the current record's "username" value
 * @method string              getPass()           Returns the current record's "pass" value
 * @method integer             getIdPerfil()       Returns the current record's "id_perfil" value
 * @method string              getEstado()         Returns the current record's "estado" value
 * @method integer             getIdTipoDoc()      Returns the current record's "id_tipo_doc" value
 * @method string              getNumDoc()         Returns the current record's "num_doc" value
 * @method string              getNombre()         Returns the current record's "nombre" value
 * @method string              getApellido()       Returns the current record's "apellido" value
 * @method string              getEmail()          Returns the current record's "email" value
 * @method ESTADO_USUARIO      getESTADOUSUARIO()  Returns the current record's "ESTADO_USUARIO" value
 * @method PERFIL              getPERFIL()         Returns the current record's "PERFIL" value
 * @method TIPO_DOCUMENTO      getTIPODOCUMENTO()  Returns the current record's "TIPO_DOCUMENTO" value
 * @method Doctrine_Collection getACTIVIDAD()      Returns the current record's "ACTIVIDAD" collection
 * @method Doctrine_Collection getACTIVIDAD11()    Returns the current record's "ACTIVIDAD_11" collection
 * @method USUARIO             setUsername()       Sets the current record's "username" value
 * @method USUARIO             setPass()           Sets the current record's "pass" value
 * @method USUARIO             setIdPerfil()       Sets the current record's "id_perfil" value
 * @method USUARIO             setEstado()         Sets the current record's "estado" value
 * @method USUARIO             setIdTipoDoc()      Sets the current record's "id_tipo_doc" value
 * @method USUARIO             setNumDoc()         Sets the current record's "num_doc" value
 * @method USUARIO             setNombre()         Sets the current record's "nombre" value
 * @method USUARIO             setApellido()       Sets the current record's "apellido" value
 * @method USUARIO             setEmail()          Sets the current record's "email" value
 * @method USUARIO             setESTADOUSUARIO()  Sets the current record's "ESTADO_USUARIO" value
 * @method USUARIO             setPERFIL()         Sets the current record's "PERFIL" value
 * @method USUARIO             setTIPODOCUMENTO()  Sets the current record's "TIPO_DOCUMENTO" value
 * @method USUARIO             setACTIVIDAD()      Sets the current record's "ACTIVIDAD" collection
 * @method USUARIO             setACTIVIDAD11()    Sets the current record's "ACTIVIDAD_11" collection
 * 
 * @package    cobro_coactivo
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseUSUARIO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('USUARIO');
        $this->hasColumn('username', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('pass', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_perfil', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('estado', 'string', 1, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 1,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('id_tipo_doc', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('num_doc', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('nombre', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('apellido', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('email', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('ESTADO_USUARIO', array(
             'local' => 'estado',
             'foreign' => 'id_est'));

        $this->hasOne('PERFIL', array(
             'local' => 'id_perfil',
             'foreign' => 'id'));

        $this->hasOne('TIPO_DOCUMENTO', array(
             'local' => 'id_tipo_doc',
             'foreign' => 'id_tipo_doc'));

        $this->hasMany('ACTIVIDAD', array(
             'local' => 'num_doc',
             'foreign' => 'num_doc_creador'));

        $this->hasMany('ACTIVIDAD as ACTIVIDAD_11', array(
             'local' => 'num_doc',
             'foreign' => 'num_doc_modificador'));
    }
}