<?php

/**
 * This is the model class for table "sidcai_tipo_notificacion".
 *
 * The followings are the available columns in table 'sidcai_tipo_notificacion':
 * @property integer $tipo_codigo_pk
 * @property string $tipo_nombre
 * @property string $tipo_descripcion
 * @property string $tipo_mensaje
 * @property string $tipo_url
 * @property boolean $tipo_habilitado
 */
class SidcaiTipoNotificacion extends CActiveRecord{
	/**
	 * @return string the associated database table name
	 */
	public function tableName(){
		return 'sidcai_tipo_notificacion';
	}

	/**
	 * @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(
			[
				'tipo_nombre, tipo_descripcion, tipo_mensaje',
				'required',
				'message' => 'Este campo es requerido.'
			],
			array('tipo_nombre, tipo_url', 'length', 'max'=>100),
			array('tipo_descripcion, tipo_mensaje', 'length', 'max'=>255),
			array('tipo_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(
			'tipo_codigo_pk' => 'Código',
			'tipo_nombre' => 'Nombre',
			'tipo_descripcion' => 'Descripción',
			'tipo_mensaje' => 'Mensaje',
			'tipo_url' => 'URL',
			'tipo_habilitado' => 'Habilitado',
		);
	}

	/**
	 * 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 SidcaiTipoNotificacion the static model class
	 */
	public static function model($className=__CLASS__){
		return parent::model($className);
	}
}
