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

/**
 * BaseCN_TD
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_td
 * @property string $cod_td
 * @property string $nombre
 * @property string $nom_cort
 * @property Doctrine_Collection $CN_DOCUMENTO
 * @property Doctrine_Collection $CNI_TRANSA
 * @property Doctrine_Collection $CNI_INTERFAZ
 * 
 * @method integer             getIdTd()         Returns the current record's "id_td" value
 * @method string              getCodTd()        Returns the current record's "cod_td" value
 * @method string              getNombre()       Returns the current record's "nombre" value
 * @method string              getNomCort()      Returns the current record's "nom_cort" value
 * @method Doctrine_Collection getCNDOCUMENTO()  Returns the current record's "CN_DOCUMENTO" collection
 * @method Doctrine_Collection getCNITRANSA()    Returns the current record's "CNI_TRANSA" collection
 * @method Doctrine_Collection getCNIINTERFAZ()  Returns the current record's "CNI_INTERFAZ" collection
 * @method CN_TD               setIdTd()         Sets the current record's "id_td" value
 * @method CN_TD               setCodTd()        Sets the current record's "cod_td" value
 * @method CN_TD               setNombre()       Sets the current record's "nombre" value
 * @method CN_TD               setNomCort()      Sets the current record's "nom_cort" value
 * @method CN_TD               setCNDOCUMENTO()  Sets the current record's "CN_DOCUMENTO" collection
 * @method CN_TD               setCNITRANSA()    Sets the current record's "CNI_TRANSA" collection
 * @method CN_TD               setCNIINTERFAZ()  Sets the current record's "CNI_INTERFAZ" collection
 * @property Doctrine_Collection $﻿CNI_TRANSA
 * 
 * @package    Sofhouse
 * @subpackage model
 * @author     Software House
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCN_TD extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CN_TD');
        $this->hasColumn('id_td', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('cod_td', 'string', 2, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 2,
             ));
        $this->hasColumn('nombre', 'string', 128, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('nom_cort', 'string', 32, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 32,
             ));
    }

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

        $this->hasMany('CNI_TRANSA', array(
             'local' => 'id_td',
             'foreign' => 'id_td'));

        $this->hasMany('CNI_INTERFAZ', array(
             'local' => 'id_td',
             'foreign' => 'id_td'));

        $this->hasMany('﻿CNI_TRANSA', array(
             'local' => 'id_td',
             'foreign' => 'id_td'));
    }
}