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

/**
 * BaseTS_REG_ACH
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_reg_ach
 * @property integer $id_tercero
 * @property string $usuariolog
 * @property timestamp $fechalog
 * @property integer $aplica_regalias
 * @property INTERCEROS $INTERCEROS
 * @property Doctrine_Collection $TS_REG_ACH_DISTRI
 * 
 * @method integer             getIdRegAch()          Returns the current record's "id_reg_ach" value
 * @method integer             getIdTercero()         Returns the current record's "id_tercero" value
 * @method string              getUsuariolog()        Returns the current record's "usuariolog" value
 * @method timestamp           getFechalog()          Returns the current record's "fechalog" value
 * @method integer             getAplicaRegalias()    Returns the current record's "aplica_regalias" value
 * @method INTERCEROS          getINTERCEROS()        Returns the current record's "INTERCEROS" value
 * @method Doctrine_Collection getTSREGACHDISTRI()    Returns the current record's "TS_REG_ACH_DISTRI" collection
 * @method TS_REG_ACH          setIdRegAch()          Sets the current record's "id_reg_ach" value
 * @method TS_REG_ACH          setIdTercero()         Sets the current record's "id_tercero" value
 * @method TS_REG_ACH          setUsuariolog()        Sets the current record's "usuariolog" value
 * @method TS_REG_ACH          setFechalog()          Sets the current record's "fechalog" value
 * @method TS_REG_ACH          setAplicaRegalias()    Sets the current record's "aplica_regalias" value
 * @method TS_REG_ACH          setINTERCEROS()        Sets the current record's "INTERCEROS" value
 * @method TS_REG_ACH          setTSREGACHDISTRI()    Sets the current record's "TS_REG_ACH_DISTRI" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseTS_REG_ACH extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TS_REG_ACH');
        $this->hasColumn('id_reg_ach', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_tercero', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('usuariolog', 'string', 50, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 50,
             ));
        $this->hasColumn('fechalog', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('aplica_regalias', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasMany('TS_REG_ACH_DISTRI', array(
             'local' => 'id_reg_ach',
             'foreign' => 'id_reg_ach'));
    }
}