| Current Path : /var/www/html/mydlvsacc/backend/models/ |
| Current File : /var/www/html/mydlvsacc/backend/models/CategoryLang.php |
<?php
namespace backend\models;
/**
* This is the model class for table "ost_bul_cat_lang".
*
* @property string $id
* @property string $cat_id
* @property string $title
* @property string $cat_lang
*
* @property OstBulCat $cat
*/
class CategoryLang extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'dmg_bul_cat_lang';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['cat_id'], 'integer'],
[['title'], 'string', 'max' => 100],
[['cat_lang'], 'string', 'max' => 5],
[['cat_id'], 'exist', 'skipOnError' => true, 'targetClass' => Category::className(), 'targetAttribute' => ['cat_id' => 'id']],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'cat_id' => yii::t('app','Cat ID'),
'title' => yii::t('app','Title'),
'cat_lang' => yii::t('app','Cat Lang'),
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getCat()
{
return $this->hasOne(OstBulCat::className(), ['id' => 'cat_id']);
}
}