<?php

/**
 * Usuarios form base class.
 *
 * @package    form
 * @subpackage usuarios
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseUsuariosForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'          => new sfWidgetFormInputHidden(),
      'id_perfil'   => new sfWidgetFormPropelSelect(array('model' => 'Perfiles', 'add_empty' => true)),
      'username'    => new sfWidgetFormInput(),
      'pass'        => new sfWidgetFormInput(),
      'estado'      => new sfWidgetFormInput(),
      'nitocc'      => new sfWidgetFormInput(),
      'fk_username' => new sfWidgetFormInput(),
      'created_at'  => new sfWidgetFormDate(),
      'update_at'   => new sfWidgetFormDate(),
    ));

    $this->setValidators(array(
      'id'          => new sfValidatorPropelChoice(array('model' => 'Usuarios', 'column' => 'id', 'required' => false)),
      'id_perfil'   => new sfValidatorPropelChoice(array('model' => 'Perfiles', 'column' => 'id', 'required' => false)),
      'username'    => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'pass'        => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'estado'      => new sfValidatorNumber(array('required' => false)),
      'nitocc'      => new sfValidatorNumber(array('required' => false)),
      'fk_username' => new sfValidatorNumber(array('required' => false)),
      'created_at'  => new sfValidatorDate(array('required' => false)),
      'update_at'   => new sfValidatorDate(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('usuarios[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Usuarios';
  }


}
