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

/**
 * BaseCA_PERFIL
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_perfil
 * @property string $nombre
 * @property string $descripcion
 * @property integer $id_modulo
 * @property integer $estado
 * @property CA_MODULO $CA_MODULO
 * @property Doctrine_Collection $CA_USUARIO_PERFIL
 * @property Doctrine_Collection $CA_PERFIL_ACCESO
 * 
 * @method integer             getIdPerfil()          Returns the current record's "id_perfil" value
 * @method string              getNombre()            Returns the current record's "nombre" value
 * @method string              getDescripcion()       Returns the current record's "descripcion" value
 * @method integer             getIdModulo()          Returns the current record's "id_modulo" value
 * @method integer             getEstado()            Returns the current record's "estado" value
 * @method CA_MODULO           getCAMODULO()          Returns the current record's "CA_MODULO" value
 * @method Doctrine_Collection getCAUSUARIOPERFIL()   Returns the current record's "CA_USUARIO_PERFIL" collection
 * @method Doctrine_Collection getCAPERFILACCESO()    Returns the current record's "CA_PERFIL_ACCESO" collection
 * @method CA_PERFIL           setIdPerfil()          Sets the current record's "id_perfil" value
 * @method CA_PERFIL           setNombre()            Sets the current record's "nombre" value
 * @method CA_PERFIL           setDescripcion()       Sets the current record's "descripcion" value
 * @method CA_PERFIL           setIdModulo()          Sets the current record's "id_modulo" value
 * @method CA_PERFIL           setEstado()            Sets the current record's "estado" value
 * @method CA_PERFIL           setCAMODULO()          Sets the current record's "CA_MODULO" value
 * @method CA_PERFIL           setCAUSUARIOPERFIL()   Sets the current record's "CA_USUARIO_PERFIL" collection
 * @method CA_PERFIL           setCAPERFILACCESO()    Sets the current record's "CA_PERFIL_ACCESO" collection
 * 
 * @package    canon
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCA_PERFIL extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_PERFIL');
        $this->hasColumn('id_perfil', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('nombre', 'string', 64, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 64,
             ));
        $this->hasColumn('descripcion', 'string', 128, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('id_modulo', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('estado', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasMany('CA_USUARIO_PERFIL', array(
             'local' => 'id_perfil',
             'foreign' => 'id_perfil'));

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