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

/**
 * BaseFORMATO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_formato
 * @property integer $codigo
 * @property timestamp $created_at
 * @property timestamp $updated_at
 * @property string $descripcion
 * @property integer $estado
 * @property Doctrine_Collection $RH_EN_REGISTRO_ENCUESTA
 * @property Doctrine_Collection $RH_EN_APLICACION
 * @property Doctrine_Collection $PREGUNTA
 * 
 * @method integer             getIdFormato()               Returns the current record's "id_formato" value
 * @method integer             getCodigo()                  Returns the current record's "codigo" value
 * @method timestamp           getCreatedAt()               Returns the current record's "created_at" value
 * @method timestamp           getUpdatedAt()               Returns the current record's "updated_at" value
 * @method string              getDescripcion()             Returns the current record's "descripcion" value
 * @method integer             getEstado()                  Returns the current record's "estado" value
 * @method Doctrine_Collection getRHENREGISTROENCUESTA()    Returns the current record's "RH_EN_REGISTRO_ENCUESTA" collection
 * @method Doctrine_Collection getRHENAPLICACION()          Returns the current record's "RH_EN_APLICACION" collection
 * @method Doctrine_Collection getPREGUNTA()                Returns the current record's "PREGUNTA" collection
 * @method FORMATO             setIdFormato()               Sets the current record's "id_formato" value
 * @method FORMATO             setCodigo()                  Sets the current record's "codigo" value
 * @method FORMATO             setCreatedAt()               Sets the current record's "created_at" value
 * @method FORMATO             setUpdatedAt()               Sets the current record's "updated_at" value
 * @method FORMATO             setDescripcion()             Sets the current record's "descripcion" value
 * @method FORMATO             setEstado()                  Sets the current record's "estado" value
 * @method FORMATO             setRHENREGISTROENCUESTA()    Sets the current record's "RH_EN_REGISTRO_ENCUESTA" collection
 * @method FORMATO             setRHENAPLICACION()          Sets the current record's "RH_EN_APLICACION" collection
 * @method FORMATO             setPREGUNTA()                Sets the current record's "PREGUNTA" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseFORMATO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('FORMATO');
        $this->hasColumn('id_formato', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('codigo', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('created_at', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('updated_at', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('descripcion', 'string', 200, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('estado', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('RH_EN_REGISTRO_ENCUESTA', array(
             'local' => 'id_formato',
             'foreign' => 'id_formato'));

        $this->hasMany('RH_EN_APLICACION', array(
             'local' => 'id_formato',
             'foreign' => 'id_formato'));

        $this->hasMany('PREGUNTA', array(
             'local' => 'id_formato',
             'foreign' => 'id_formato'));
    }
}