BaseMzgtlineasinvestigacion.php 2.31 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 70 71 72 73
<?php

/**
 * This is the model base class for the table "mzgtlineasinvestigacion".
 * 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 "Mzgtlineasinvestigacion".
 *
 * Columns in table "mzgtlineasinvestigacion" available as properties of the model,
 * and there are no model relations.
 *
 * @property integer $PK_MZGTLINEASINVESTIGACION
 * @property string $MZGTLINEASINVESTIGACION_DESCRIPCION
 * @property string $MZGTLINEASINVESTIGACION_CODIGO
 *
 */
abstract class BaseMzgtlineasinvestigacion extends GxActiveRecord {

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

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

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

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

	public function rules() {
		return array(
			array('MZGTLINEASINVESTIGACION_DESCRIPCION', 'length', 'max'=>255),
			array('MZGTLINEASINVESTIGACION_CODIGO', 'length', 'max'=>50),
			array('MZGTLINEASINVESTIGACION_DESCRIPCION, MZGTLINEASINVESTIGACION_CODIGO', 'default', 'setOnEmpty' => true, 'value' => null),
			array('PK_MZGTLINEASINVESTIGACION, MZGTLINEASINVESTIGACION_DESCRIPCION, MZGTLINEASINVESTIGACION_CODIGO', 'safe', 'on'=>'search'),
		);
	}

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

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

	public function attributeLabels() {
		return array(
			'PK_MZGTLINEASINVESTIGACION' => Yii::t('app', 'Pk Mzgtlineasinvestigacion'),
			'MZGTLINEASINVESTIGACION_DESCRIPCION' => Yii::t('app', 'Mzgtlineasinvestigacion Descripcion'),
			'MZGTLINEASINVESTIGACION_CODIGO' => Yii::t('app', 'Mzgtlineasinvestigacion Codigo'),
		);
	}

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

		$criteria->compare('PK_MZGTLINEASINVESTIGACION', $this->PK_MZGTLINEASINVESTIGACION);
		$criteria->compare('MZGTLINEASINVESTIGACION_DESCRIPCION', $this->MZGTLINEASINVESTIGACION_DESCRIPCION, true);
		$criteria->compare('MZGTLINEASINVESTIGACION_CODIGO', $this->MZGTLINEASINVESTIGACION_CODIGO, true);

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