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

/**
 * BaseCACO_ENTIDAD_CONTRATO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_entidad_contrato
 * @property integer $id_mae_ter
 * @property integer $estado
 * @property string $correo_electronico
 * @property INTERCEROS $INTERCEROS
 * @property Doctrine_Collection $CACO_CONTRATO_ENTIDAD
 * 
 * @method integer               getIdEntidadContrato()     Returns the current record's "id_entidad_contrato" value
 * @method integer               getIdMaeTer()              Returns the current record's "id_mae_ter" value
 * @method integer               getEstado()                Returns the current record's "estado" value
 * @method string                getCorreoElectronico()     Returns the current record's "correo_electronico" value
 * @method INTERCEROS            getINTERCEROS()            Returns the current record's "INTERCEROS" value
 * @method Doctrine_Collection   getCACOCONTRATOENTIDAD()   Returns the current record's "CACO_CONTRATO_ENTIDAD" collection
 * @method CACO_ENTIDAD_CONTRATO setIdEntidadContrato()     Sets the current record's "id_entidad_contrato" value
 * @method CACO_ENTIDAD_CONTRATO setIdMaeTer()              Sets the current record's "id_mae_ter" value
 * @method CACO_ENTIDAD_CONTRATO setEstado()                Sets the current record's "estado" value
 * @method CACO_ENTIDAD_CONTRATO setCorreoElectronico()     Sets the current record's "correo_electronico" value
 * @method CACO_ENTIDAD_CONTRATO setINTERCEROS()            Sets the current record's "INTERCEROS" value
 * @method CACO_ENTIDAD_CONTRATO setCACOCONTRATOENTIDAD()   Sets the current record's "CACO_CONTRATO_ENTIDAD" collection
 * 
 * @package    ProyectoSchema
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseCACO_ENTIDAD_CONTRATO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CACO_ENTIDAD_CONTRATO');
        $this->hasColumn('id_entidad_contrato', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_mae_ter', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('estado', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1 ',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('correo_electronico', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
    }

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

        $this->hasMany('CACO_CONTRATO_ENTIDAD', array(
             'local' => 'id_entidad_contrato',
             'foreign' => 'id_entidad_contrato'));
    }
}