<?php /** * This is the model base class for the table "mzgtpaises". * 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 "Mzgtpaises". * * Columns in table "mzgtpaises" available as properties of the model, * and there are no model relations. * * @property integer $PK_MZGTPAISES * @property string $MZGTPAISES_NOMBRE * @property string $MZGTPAISES_SIGLAS * @property string $MZGTPAISES_CODIGO * @property integer $MZGTPAISES_ESTADO * */ abstract class BaseMzgtpaises extends GxActiveRecord { public static function model($className=__CLASS__) { return parent::model($className); } public function tableName() { return 'mzgtpaises'; } public static function label($n = 1) { return Yii::t('app', 'Mzgtpaises|Mzgtpaises', $n); } public static function representingColumn() { return 'MZGTPAISES_NOMBRE'; } public function rules() { return array( array('MZGTPAISES_NOMBRE, MZGTPAISES_ESTADO', 'required'), array('MZGTPAISES_ESTADO', 'numerical', 'integerOnly'=>true), array('MZGTPAISES_NOMBRE', 'length', 'max'=>255), array('MZGTPAISES_SIGLAS', 'length', 'max'=>50), array('MZGTPAISES_CODIGO', 'length', 'max'=>300), array('MZGTPAISES_SIGLAS, MZGTPAISES_CODIGO', 'default', 'setOnEmpty' => true, 'value' => null), array('PK_MZGTPAISES, MZGTPAISES_NOMBRE, MZGTPAISES_SIGLAS, MZGTPAISES_CODIGO, MZGTPAISES_ESTADO', 'safe', 'on'=>'search'), ); } public function relations() { return array( ); } public function pivotModels() { return array( ); } public function attributeLabels() { return array( 'PK_MZGTPAISES' => Yii::t('app', 'Pk Mzgtpaises'), 'MZGTPAISES_NOMBRE' => Yii::t('app', 'Mzgtpaises Nombre'), 'MZGTPAISES_SIGLAS' => Yii::t('app', 'Mzgtpaises Siglas'), 'MZGTPAISES_CODIGO' => Yii::t('app', 'Mzgtpaises Codigo'), 'MZGTPAISES_ESTADO' => Yii::t('app', 'Mzgtpaises Estado'), ); } public function search() { $criteria = new CDbCriteria; $criteria->compare('PK_MZGTPAISES', $this->PK_MZGTPAISES); $criteria->compare('MZGTPAISES_NOMBRE', $this->MZGTPAISES_NOMBRE, true); $criteria->compare('MZGTPAISES_SIGLAS', $this->MZGTPAISES_SIGLAS, true); $criteria->compare('MZGTPAISES_CODIGO', $this->MZGTPAISES_CODIGO, true); $criteria->compare('MZGTPAISES_ESTADO', $this->MZGTPAISES_ESTADO); return new CActiveDataProvider($this, array( 'criteria' => $criteria, )); } }