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

/**
 * BaseCN_SUB_CENTRO_COSTO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_sub_centro_costo
 * @property integer $id_cia
 * @property string $nombre
 * @property string $nom_corto
 * @property string $cod_sub_proy
 * @property CN_CIA $CN_CIA
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_14
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_15
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_16
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_31
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_32
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_33
 * 
 * @method integer             getIdSubCentroCosto()          Returns the current record's "id_sub_centro_costo" value
 * @method integer             getIdCia()                     Returns the current record's "id_cia" value
 * @method string              getNombre()                    Returns the current record's "nombre" value
 * @method string              getNomCorto()                  Returns the current record's "nom_corto" value
 * @method string              getCodSubProy()                Returns the current record's "cod_sub_proy" value
 * @method CN_CIA              getCNCIA()                     Returns the current record's "CN_CIA" value
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE()      Returns the current record's "CN_MOVIMIENTO_CONTABLE" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE14()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_14" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE15()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_15" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE16()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_16" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE31()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_31" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE32()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_32" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE33()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_33" collection
 * @method CN_SUB_CENTRO_COSTO setIdSubCentroCosto()          Sets the current record's "id_sub_centro_costo" value
 * @method CN_SUB_CENTRO_COSTO setIdCia()                     Sets the current record's "id_cia" value
 * @method CN_SUB_CENTRO_COSTO setNombre()                    Sets the current record's "nombre" value
 * @method CN_SUB_CENTRO_COSTO setNomCorto()                  Sets the current record's "nom_corto" value
 * @method CN_SUB_CENTRO_COSTO setCodSubProy()                Sets the current record's "cod_sub_proy" value
 * @method CN_SUB_CENTRO_COSTO setCNCIA()                     Sets the current record's "CN_CIA" value
 * @method CN_SUB_CENTRO_COSTO setCNMOVIMIENTOCONTABLE()      Sets the current record's "CN_MOVIMIENTO_CONTABLE" collection
 * @method CN_SUB_CENTRO_COSTO setCNMOVIMIENTOCONTABLE14()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_14" collection
 * @method CN_SUB_CENTRO_COSTO setCNMOVIMIENTOCONTABLE15()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_15" collection
 * @method CN_SUB_CENTRO_COSTO setCNMOVIMIENTOCONTABLE16()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_16" collection
 * @method CN_SUB_CENTRO_COSTO setCNMOVIMIENTOCONTABLE31()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_31" collection
 * @method CN_SUB_CENTRO_COSTO setCNMOVIMIENTOCONTABLE32()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_32" collection
 * @method CN_SUB_CENTRO_COSTO setCNMOVIMIENTOCONTABLE33()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_33" collection
 * 
 * @package    Sofhouse
 * @subpackage model
 * @author     Software House
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCN_SUB_CENTRO_COSTO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CN_SUB_CENTRO_COSTO');
        $this->hasColumn('id_sub_centro_costo', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_cia', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('nombre', 'string', 128, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('nom_corto', 'string', 32, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 32,
             ));
        $this->hasColumn('cod_sub_proy', 'string', 128, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
    }

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

        $this->hasMany('CN_MOVIMIENTO_CONTABLE', array(
             'local' => 'id_sub_centro_costo',
             'foreign' => 'id_cia'));

        $this->hasMany('CN_MOVIMIENTO_CONTABLE as CN_MOVIMIENTO_CONTABLE_14', array(
             'local' => 'id_sub_centro_costo',
             'foreign' => 'id_sub_centro_costo'));

        $this->hasMany('CN_MOVIMIENTO_CONTABLE as CN_MOVIMIENTO_CONTABLE_15', array(
             'local' => 'id_cia',
             'foreign' => 'id_cia'));

        $this->hasMany('CN_MOVIMIENTO_CONTABLE as CN_MOVIMIENTO_CONTABLE_16', array(
             'local' => 'id_cia',
             'foreign' => 'id_sub_centro_costo'));

        $this->hasMany('CN_MOVIMIENTO_CONTABLE as CN_MOVIMIENTO_CONTABLE_31', array(
             'local' => 'id_cia',
             'foreign' => 'id_cia'));

        $this->hasMany('CN_MOVIMIENTO_CONTABLE as CN_MOVIMIENTO_CONTABLE_32', array(
             'local' => 'id_sub_centro_costo',
             'foreign' => 'id_sub_centro_costo'));

        $this->hasMany('CN_MOVIMIENTO_CONTABLE as CN_MOVIMIENTO_CONTABLE_33', array(
             'local' => 'id_cia',
             'foreign' => 'id_sub_centro_costo'));
    }
}