BaseMzgtautores.php 1.71 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
<?php

/**
 * This is the model base class for the table "mzgtautores".
 * 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 "Mzgtautores".
 *
 * Columns in table "mzgtautores" available as properties of the model,
 * and there are no model relations.
 *
 * @property integer $PK_MZGTPUBLICACIONES
 * @property integer $PK_MZGTBANCOAUTORES
 *
 */
abstract class BaseMzgtautores extends GxActiveRecord {

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

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

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

	public static function representingColumn() {
		return 'PK_MZGTPUBLICACIONES';
	}

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

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

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

	public function attributeLabels() {
		return array(
			'PK_MZGTPUBLICACIONES' => Yii::t('app', 'Pk Mzgtpublicaciones'),
			'PK_MZGTBANCOAUTORES' => Yii::t('app', 'Pk Mzgtbancoautores'),
		);
	}

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

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

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