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

/**
 * BaseCN_CENTRO_COSTO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_centro_costo
 * @property integer $id_cia
 * @property string $nombre
 * @property string $nom_corto
 * @property string $cod_proy
 * @property CN_CIA $CN_CIA
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_18
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_19
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_20
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_27
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_28
 * @property Doctrine_Collection $CN_MOVIMIENTO_CONTABLE_29
 * 
 * @method integer             getIdCentroCosto()             Returns the current record's "id_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              getCodProy()                   Returns the current record's "cod_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 getCNMOVIMIENTOCONTABLE18()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_18" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE19()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_19" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE20()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_20" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE27()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_27" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE28()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_28" collection
 * @method Doctrine_Collection getCNMOVIMIENTOCONTABLE29()    Returns the current record's "CN_MOVIMIENTO_CONTABLE_29" collection
 * @method CN_CENTRO_COSTO     setIdCentroCosto()             Sets the current record's "id_centro_costo" value
 * @method CN_CENTRO_COSTO     setIdCia()                     Sets the current record's "id_cia" value
 * @method CN_CENTRO_COSTO     setNombre()                    Sets the current record's "nombre" value
 * @method CN_CENTRO_COSTO     setNomCorto()                  Sets the current record's "nom_corto" value
 * @method CN_CENTRO_COSTO     setCodProy()                   Sets the current record's "cod_proy" value
 * @method CN_CENTRO_COSTO     setCNCIA()                     Sets the current record's "CN_CIA" value
 * @method CN_CENTRO_COSTO     setCNMOVIMIENTOCONTABLE()      Sets the current record's "CN_MOVIMIENTO_CONTABLE" collection
 * @method CN_CENTRO_COSTO     setCNMOVIMIENTOCONTABLE18()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_18" collection
 * @method CN_CENTRO_COSTO     setCNMOVIMIENTOCONTABLE19()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_19" collection
 * @method CN_CENTRO_COSTO     setCNMOVIMIENTOCONTABLE20()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_20" collection
 * @method CN_CENTRO_COSTO     setCNMOVIMIENTOCONTABLE27()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_27" collection
 * @method CN_CENTRO_COSTO     setCNMOVIMIENTOCONTABLE28()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_28" collection
 * @method CN_CENTRO_COSTO     setCNMOVIMIENTOCONTABLE29()    Sets the current record's "CN_MOVIMIENTO_CONTABLE_29" collection
 * 
 * @package    Sofhouse
 * @subpackage model
 * @author     Software House
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCN_CENTRO_COSTO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CN_CENTRO_COSTO');
        $this->hasColumn('id_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_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_centro_costo',
             'foreign' => 'id_cia'));

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

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

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

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

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

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