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

/**
 * BaseCACO_CONTRATO_ENTIDAD
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_contrato
 * @property integer $id_entidad_contrato
 * @property integer $titular
 * @property integer $estado
 * @property CACO_CONTRATO $CACO_CONTRATO
 * @property CACO_ENTIDAD_CONTRATO $CACO_ENTIDAD_CONTRATO
 * 
 * @method integer               getIdContrato()            Returns the current record's "id_contrato" value
 * @method integer               getIdEntidadContrato()     Returns the current record's "id_entidad_contrato" value
 * @method integer               getTitular()               Returns the current record's "titular" value
 * @method integer               getEstado()                Returns the current record's "estado" value
 * @method CACO_CONTRATO         getCACOCONTRATO()          Returns the current record's "CACO_CONTRATO" value
 * @method CACO_ENTIDAD_CONTRATO getCACOENTIDADCONTRATO()   Returns the current record's "CACO_ENTIDAD_CONTRATO" value
 * @method CACO_CONTRATO_ENTIDAD setIdContrato()            Sets the current record's "id_contrato" value
 * @method CACO_CONTRATO_ENTIDAD setIdEntidadContrato()     Sets the current record's "id_entidad_contrato" value
 * @method CACO_CONTRATO_ENTIDAD setTitular()               Sets the current record's "titular" value
 * @method CACO_CONTRATO_ENTIDAD setEstado()                Sets the current record's "estado" value
 * @method CACO_CONTRATO_ENTIDAD setCACOCONTRATO()          Sets the current record's "CACO_CONTRATO" value
 * @method CACO_CONTRATO_ENTIDAD setCACOENTIDADCONTRATO()   Sets the current record's "CACO_ENTIDAD_CONTRATO" value
 * 
 * @package    ProyectoSchema
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseCACO_CONTRATO_ENTIDAD extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CACO_CONTRATO_ENTIDAD');
        $this->hasColumn('id_contrato', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_entidad_contrato', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('titular', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('estado', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1 ',
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasOne('CACO_ENTIDAD_CONTRATO', array(
             'local' => 'id_entidad_contrato',
             'foreign' => 'id_entidad_contrato'));
    }
}