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

/**
 * BaseCM_CAJA_MENOR
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_caja_menor
 * @property string $nombre_c_menor
 * @property integer $id_mae_ter
 * @property integer $estado
 * @property integer $codsiif
 * @property integer $codciudad
 * @property integer $codregional
 * @property string $expedidor
 * @property string $nombre_funcionario
 * @property string $cargo_funcionario
 * @property Doctrine_Collection $CM_CB
 * @property Doctrine_Collection $CM_CONSECUTIVOS
 * @property Doctrine_Collection $CM_EMISION_PAGO
 * @property Doctrine_Collection $CM_SALDOS_ACR
 * @property Doctrine_Collection $CM_ANUL_PAGOS
 * 
 * @method integer             getIdCajaMenor()        Returns the current record's "id_caja_menor" value
 * @method string              getNombreCMenor()       Returns the current record's "nombre_c_menor" value
 * @method integer             getIdMaeTer()           Returns the current record's "id_mae_ter" value
 * @method integer             getEstado()             Returns the current record's "estado" value
 * @method integer             getCodsiif()            Returns the current record's "codsiif" value
 * @method integer             getCodciudad()          Returns the current record's "codciudad" value
 * @method integer             getCodregional()        Returns the current record's "codregional" value
 * @method string              getExpedidor()          Returns the current record's "expedidor" value
 * @method string              getNombreFuncionario()  Returns the current record's "nombre_funcionario" value
 * @method string              getCargoFuncionario()   Returns the current record's "cargo_funcionario" value
 * @method Doctrine_Collection getCMCB()               Returns the current record's "CM_CB" collection
 * @method Doctrine_Collection getCMCONSECUTIVOS()     Returns the current record's "CM_CONSECUTIVOS" collection
 * @method Doctrine_Collection getCMEMISIONPAGO()      Returns the current record's "CM_EMISION_PAGO" collection
 * @method Doctrine_Collection getCMSALDOSACR()        Returns the current record's "CM_SALDOS_ACR" collection
 * @method Doctrine_Collection getCMANULPAGOS()        Returns the current record's "CM_ANUL_PAGOS" collection
 * @method CM_CAJA_MENOR       setIdCajaMenor()        Sets the current record's "id_caja_menor" value
 * @method CM_CAJA_MENOR       setNombreCMenor()       Sets the current record's "nombre_c_menor" value
 * @method CM_CAJA_MENOR       setIdMaeTer()           Sets the current record's "id_mae_ter" value
 * @method CM_CAJA_MENOR       setEstado()             Sets the current record's "estado" value
 * @method CM_CAJA_MENOR       setCodsiif()            Sets the current record's "codsiif" value
 * @method CM_CAJA_MENOR       setCodciudad()          Sets the current record's "codciudad" value
 * @method CM_CAJA_MENOR       setCodregional()        Sets the current record's "codregional" value
 * @method CM_CAJA_MENOR       setExpedidor()          Sets the current record's "expedidor" value
 * @method CM_CAJA_MENOR       setNombreFuncionario()  Sets the current record's "nombre_funcionario" value
 * @method CM_CAJA_MENOR       setCargoFuncionario()   Sets the current record's "cargo_funcionario" value
 * @method CM_CAJA_MENOR       setCMCB()               Sets the current record's "CM_CB" collection
 * @method CM_CAJA_MENOR       setCMCONSECUTIVOS()     Sets the current record's "CM_CONSECUTIVOS" collection
 * @method CM_CAJA_MENOR       setCMEMISIONPAGO()      Sets the current record's "CM_EMISION_PAGO" collection
 * @method CM_CAJA_MENOR       setCMSALDOSACR()        Sets the current record's "CM_SALDOS_ACR" collection
 * @method CM_CAJA_MENOR       setCMANULPAGOS()        Sets the current record's "CM_ANUL_PAGOS" collection
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCM_CAJA_MENOR extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CM_CAJA_MENOR');
        $this->hasColumn('id_caja_menor', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('nombre_c_menor', 'string', 200, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('id_mae_ter', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('estado', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('codsiif', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('codciudad', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('codregional', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('expedidor', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('nombre_funcionario', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('cargo_funcionario', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasMany('CM_CONSECUTIVOS', array(
             'local' => 'id_caja_menor',
             'foreign' => 'id_caja_menor'));

        $this->hasMany('CM_EMISION_PAGO', array(
             'local' => 'id_caja_menor',
             'foreign' => 'id_caja_menor'));

        $this->hasMany('CM_SALDOS_ACR', array(
             'local' => 'id_caja_menor',
             'foreign' => 'id_caja_menor'));

        $this->hasMany('CM_ANUL_PAGOS', array(
             'local' => 'id_caja_menor',
             'foreign' => 'id_caja_menor'));
    }
}