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

/**
 * BaseCREDENCIALES
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $id_menu
 * @property string $name
 * @property string $descripcion
 * @property integer $orden
 * @property timestamp $update_at
 * @property string $ruta
 * @property MENUS $MENUS
 * @property Doctrine_Collection $PERFILES_CREDENCIALES
 * 
 * @method integer             getId()                    Returns the current record's "id" value
 * @method integer             getIdMenu()                Returns the current record's "id_menu" value
 * @method string              getName()                  Returns the current record's "name" value
 * @method string              getDescripcion()           Returns the current record's "descripcion" value
 * @method integer             getOrden()                 Returns the current record's "orden" value
 * @method timestamp           getUpdateAt()              Returns the current record's "update_at" value
 * @method string              getRuta()                  Returns the current record's "ruta" value
 * @method MENUS               getMENUS()                 Returns the current record's "MENUS" value
 * @method Doctrine_Collection getPERFILESCREDENCIALES()  Returns the current record's "PERFILES_CREDENCIALES" collection
 * @method CREDENCIALES        setId()                    Sets the current record's "id" value
 * @method CREDENCIALES        setIdMenu()                Sets the current record's "id_menu" value
 * @method CREDENCIALES        setName()                  Sets the current record's "name" value
 * @method CREDENCIALES        setDescripcion()           Sets the current record's "descripcion" value
 * @method CREDENCIALES        setOrden()                 Sets the current record's "orden" value
 * @method CREDENCIALES        setUpdateAt()              Sets the current record's "update_at" value
 * @method CREDENCIALES        setRuta()                  Sets the current record's "ruta" value
 * @method CREDENCIALES        setMENUS()                 Sets the current record's "MENUS" value
 * @method CREDENCIALES        setPERFILESCREDENCIALES()  Sets the current record's "PERFILES_CREDENCIALES" 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 BaseCREDENCIALES extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CREDENCIALES');
        $this->hasColumn('id', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_menu', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('name', 'string', 100, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('descripcion', 'string', 30, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 30,
             ));
        $this->hasColumn('orden', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('update_at', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('ruta', 'string', 30, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 30,
             ));
    }

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

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