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

/**
 * BaseCOM_CUENTA
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_cuenta
 * @property integer $id_resolucion
 * @property integer $no_cuenta
 * @property integer $id_anhos
 * @property timestamp $fecha_cuenta
 * @property integer $id_mae_ter
 * @property string $observaciones
 * @property integer $estado
 * @property timestamp $fecha_anulacion
 * @property string $motivo_anulacion
 * @property COM_RESOLUCION $COM_RESOLUCION
 * @property INTERCEROS $INTERCEROS
 * @property Doctrine_Collection $COM_PAGO_EGRESO
 * @property Doctrine_Collection $COM_DETA_CUENTA
 * 
 * @method integer             getIdCuenta()         Returns the current record's "id_cuenta" value
 * @method integer             getIdResolucion()     Returns the current record's "id_resolucion" value
 * @method integer             getNoCuenta()         Returns the current record's "no_cuenta" value
 * @method integer             getIdAnhos()          Returns the current record's "id_anhos" value
 * @method timestamp           getFechaCuenta()      Returns the current record's "fecha_cuenta" value
 * @method integer             getIdMaeTer()         Returns the current record's "id_mae_ter" value
 * @method string              getObservaciones()    Returns the current record's "observaciones" value
 * @method integer             getEstado()           Returns the current record's "estado" value
 * @method timestamp           getFechaAnulacion()   Returns the current record's "fecha_anulacion" value
 * @method string              getMotivoAnulacion()  Returns the current record's "motivo_anulacion" value
 * @method COM_RESOLUCION      getCOMRESOLUCION()    Returns the current record's "COM_RESOLUCION" value
 * @method INTERCEROS          getINTERCEROS()       Returns the current record's "INTERCEROS" value
 * @method Doctrine_Collection getCOMPAGOEGRESO()    Returns the current record's "COM_PAGO_EGRESO" collection
 * @method Doctrine_Collection getCOMDETACUENTA()    Returns the current record's "COM_DETA_CUENTA" collection
 * @method COM_CUENTA          setIdCuenta()         Sets the current record's "id_cuenta" value
 * @method COM_CUENTA          setIdResolucion()     Sets the current record's "id_resolucion" value
 * @method COM_CUENTA          setNoCuenta()         Sets the current record's "no_cuenta" value
 * @method COM_CUENTA          setIdAnhos()          Sets the current record's "id_anhos" value
 * @method COM_CUENTA          setFechaCuenta()      Sets the current record's "fecha_cuenta" value
 * @method COM_CUENTA          setIdMaeTer()         Sets the current record's "id_mae_ter" value
 * @method COM_CUENTA          setObservaciones()    Sets the current record's "observaciones" value
 * @method COM_CUENTA          setEstado()           Sets the current record's "estado" value
 * @method COM_CUENTA          setFechaAnulacion()   Sets the current record's "fecha_anulacion" value
 * @method COM_CUENTA          setMotivoAnulacion()  Sets the current record's "motivo_anulacion" value
 * @method COM_CUENTA          setCOMRESOLUCION()    Sets the current record's "COM_RESOLUCION" value
 * @method COM_CUENTA          setINTERCEROS()       Sets the current record's "INTERCEROS" value
 * @method COM_CUENTA          setCOMPAGOEGRESO()    Sets the current record's "COM_PAGO_EGRESO" collection
 * @method COM_CUENTA          setCOMDETACUENTA()    Sets the current record's "COM_DETA_CUENTA" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCOM_CUENTA extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('COM_CUENTA');
        $this->hasColumn('id_cuenta', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_resolucion', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('no_cuenta', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('no_caja', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_anhos', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha_cuenta', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('id_tercero', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('observaciones', 'string', 500, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('estado', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('fecha_anulacion', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('motivo_anulacion', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
    }

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

        $this->hasOne('COM_TERCERO', array(
             'local' => 'id_tercero',
             'foreign' => 'id_tercero'));

        $this->hasMany('COM_PAGO_EGRESO', array(
             'local' => 'id_cuenta',
             'foreign' => 'id_cuenta'));

        $this->hasMany('COM_DETA_CUENTA', array(
             'local' => 'id_cuenta',
             'foreign' => 'id_cuenta'));
    }
}