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

/**
 * BasePERFIL
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property string $nombre
 * @property string $estado
 * @property integer $id
 * @property ESTADO_USUARIO $ESTADO_USUARIO
 * @property Doctrine_Collection $USUARIO
 * 
 * @method string              getNombre()         Returns the current record's "nombre" value
 * @method string              getEstado()         Returns the current record's "estado" value
 * @method integer             getId()             Returns the current record's "id" value
 * @method ESTADO_USUARIO      getESTADOUSUARIO()  Returns the current record's "ESTADO_USUARIO" value
 * @method Doctrine_Collection getUSUARIO()        Returns the current record's "USUARIO" collection
 * @method PERFIL              setNombre()         Sets the current record's "nombre" value
 * @method PERFIL              setEstado()         Sets the current record's "estado" value
 * @method PERFIL              setId()             Sets the current record's "id" value
 * @method PERFIL              setESTADOUSUARIO()  Sets the current record's "ESTADO_USUARIO" value
 * @method PERFIL              setUSUARIO()        Sets the current record's "USUARIO" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BasePERFIL extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PERFIL');
        $this->hasColumn('nombre', 'string', 30, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 30,
             ));
        $this->hasColumn('estado', 'string', 1, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 1,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('id', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
    }

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

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