<?php

/**
 * This is the model base class for the table "mzgtautoreslibros".
 * DO NOT MODIFY THIS FILE! It is automatically generated by giix.
 * If any changes are necessary, you must set or override the required
 * property or method in class "Mzgtautoreslibros".
 *
 * Columns in table "mzgtautoreslibros" available as properties of the model,
 * and there are no model relations.
 *
 * @property integer $PK_MZGTLIBROS
 * @property integer $PK_MZGTBANCOAUTORES
 *
 */
abstract class BaseMzgtautoreslibros extends GxActiveRecord {

	public static function model($className=__CLASS__) {
		return parent::model($className);
	}

	public function tableName() {
		return 'mzgtautoreslibros';
	}

	public static function label($n = 1) {
		return Yii::t('app', 'Mzgtautoreslibros|Mzgtautoreslibroses', $n);
	}

	public static function representingColumn() {
		return array(
			'PK_MZGTLIBROS',
			'PK_MZGTBANCOAUTORES',
		);
	}

	public function rules() {
		return array(
			array('PK_MZGTLIBROS, PK_MZGTBANCOAUTORES', 'required'),
			array('PK_MZGTLIBROS, PK_MZGTBANCOAUTORES', 'numerical', 'integerOnly'=>true),
			array('PK_MZGTLIBROS, PK_MZGTBANCOAUTORES', 'safe', 'on'=>'search'),
		);
	}

	public function relations() {
		return array(
		);
	}

	public function pivotModels() {
		return array(
		);
	}

	public function attributeLabels() {
		return array(
			'PK_MZGTLIBROS' => null,
			'PK_MZGTBANCOAUTORES' => null,
		);
	}

	public function search() {
		$criteria = new CDbCriteria;

		$criteria->compare('PK_MZGTLIBROS', $this->PK_MZGTLIBROS);
		$criteria->compare('PK_MZGTBANCOAUTORES', $this->PK_MZGTBANCOAUTORES);

		return new CActiveDataProvider($this, array(
			'criteria' => $criteria,
		));
	}
}