<?php

/**
 * This is the model class for table "sidcai_firma_presidente".
 *
 * The followings are the available columns in table 'sidcai_firma_presidente':
 * @property integer $firm_codigo_pk
 * @property string $firm_nombre
 * @property string $firm_cargo
 * @property string $firm_gaceta
 * @property string $firm_ruta
 * @property boolean $firm_habilitado
 */
class SidcaiFirmaPresidente extends CActiveRecord{
	public $imagen;
	/**
	 * @return string the associated database table name
	 */
	public function tableName(){
		return 'sidcai_firma_presidente';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules(){
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array(
				'firm_nombre, firm_cargo, firm_gaceta, firm_ruta, firm_inicio_periodo, firm_fin_periodo', 
				'required',
				'message' => 'Este campo es requerido.'
			),
			array('firm_nombre, firm_cargo', 'length', 'max'=>45),
			array('firm_ruta', 'length', 'max'=>255),
			array('firm_habilitado', 'safe'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations(){
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels(){
		return array(
			'firm_codigo_pk' 	=> 'Firm Codigo Pk',
			'firm_nombre' 		=> 'Nombre',
			'firm_cargo' 		=> 'Cargo',
			'firm_gaceta' 		=> 'Gaceta',
			'firm_ruta' 		=> 'Ruta',
			'firm_habilitado' 	=> 'Habilitado',
			'firm_inicio_periodo' 	=> 'Inicio Periodo',
			'firm_fin_periodo' 	=> 'Fin Periodo',
		);
	}

	/**
	 * Returns the static model of the specified AR class.
	 * Please note that you should have this exact method in all your CActiveRecord descendants!
	 * @param string $className active record class name.
	 * @return SidcaiFirmaPresidente the static model class
	 */
	public static function model($className=__CLASS__){
		return parent::model($className);
	}
}
