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

/**
 * BaseCONT_CONTRATO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_contrato
 * @property integer $id_tipo_doc
 * @property string $num_doc
 * @property string $num_contrato
 * @property integer $id_anhos
 * @property timestamp $fecha_contrato
 * @property decimal $valor_contrato
 * @property timestamp $fecha_ini
 * @property timestamp $fecha_fin
 * @property integer $id_depto_contrato
 * @property integer $id_muni_contrato
 * @property decimal $sueldo
 * @property integer $estado
 * @property CONTRATISTA $CONTRATISTA
 * @property CONTRATISTA $CONTRATISTA_2
 * @property CONTRATISTA $CONTRATISTA_3
 * @property CONTRATISTA $CONTRATISTA_4
 * 
 * @method integer       getIdContrato()        Returns the current record's "id_contrato" value
 * @method integer       getIdTipoDoc()         Returns the current record's "id_tipo_doc" value
 * @method string        getNumDoc()            Returns the current record's "num_doc" value
 * @method string        getNumContrato()       Returns the current record's "num_contrato" value
 * @method integer       getIdAnhos()           Returns the current record's "id_anhos" value
 * @method timestamp     getFechaContrato()     Returns the current record's "fecha_contrato" value
 * @method decimal       getValorContrato()     Returns the current record's "valor_contrato" value
 * @method timestamp     getFechaIni()          Returns the current record's "fecha_ini" value
 * @method timestamp     getFechaFin()          Returns the current record's "fecha_fin" value
 * @method integer       getIdDeptoContrato()   Returns the current record's "id_depto_contrato" value
 * @method integer       getIdMuniContrato()    Returns the current record's "id_muni_contrato" value
 * @method decimal       getSueldo()            Returns the current record's "sueldo" value
 * @method integer       getEstado()            Returns the current record's "estado" value
 * @method CONTRATISTA   getCONTRATISTA()       Returns the current record's "CONTRATISTA" value
 * @method CONTRATISTA   getCONTRATISTA2()      Returns the current record's "CONTRATISTA_2" value
 * @method CONTRATISTA   getCONTRATISTA3()      Returns the current record's "CONTRATISTA_3" value
 * @method CONTRATISTA   getCONTRATISTA4()      Returns the current record's "CONTRATISTA_4" value
 * @method CONT_CONTRATO setIdContrato()        Sets the current record's "id_contrato" value
 * @method CONT_CONTRATO setIdTipoDoc()         Sets the current record's "id_tipo_doc" value
 * @method CONT_CONTRATO setNumDoc()            Sets the current record's "num_doc" value
 * @method CONT_CONTRATO setNumContrato()       Sets the current record's "num_contrato" value
 * @method CONT_CONTRATO setIdAnhos()           Sets the current record's "id_anhos" value
 * @method CONT_CONTRATO setFechaContrato()     Sets the current record's "fecha_contrato" value
 * @method CONT_CONTRATO setValorContrato()     Sets the current record's "valor_contrato" value
 * @method CONT_CONTRATO setFechaIni()          Sets the current record's "fecha_ini" value
 * @method CONT_CONTRATO setFechaFin()          Sets the current record's "fecha_fin" value
 * @method CONT_CONTRATO setIdDeptoContrato()   Sets the current record's "id_depto_contrato" value
 * @method CONT_CONTRATO setIdMuniContrato()    Sets the current record's "id_muni_contrato" value
 * @method CONT_CONTRATO setSueldo()            Sets the current record's "sueldo" value
 * @method CONT_CONTRATO setEstado()            Sets the current record's "estado" value
 * @method CONT_CONTRATO setCONTRATISTA()       Sets the current record's "CONTRATISTA" value
 * @method CONT_CONTRATO setCONTRATISTA2()      Sets the current record's "CONTRATISTA_2" value
 * @method CONT_CONTRATO setCONTRATISTA3()      Sets the current record's "CONTRATISTA_3" value
 * @method CONT_CONTRATO setCONTRATISTA4()      Sets the current record's "CONTRATISTA_4" value
 * 
 * @package    cobro_coactivo
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCONT_CONTRATO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CONT_CONTRATO');
        $this->hasColumn('id_contrato', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_tipo_doc', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('num_doc', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('num_contrato', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_anhos', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('fecha_contrato', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('valor_contrato', 'decimal', 20, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha_ini', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_fin', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('id_depto_contrato', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_muni_contrato', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('sueldo', 'decimal', 20, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('estado', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0
                ',
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasOne('CONTRATISTA as CONTRATISTA_2', array(
             'local' => 'num_doc',
             'foreign' => 'id_tipo_doc'));

        $this->hasOne('CONTRATISTA as CONTRATISTA_3', array(
             'local' => 'id_tipo_doc',
             'foreign' => 'num_doc'));

        $this->hasOne('CONTRATISTA as CONTRATISTA_4', array(
             'local' => 'num_doc',
             'foreign' => 'num_doc'));
    }
}