<?php

namespace frontend\models;

use Yii;

/**
 * This is the model class for table "language_lang".
 *
 * @property integer $language_id
 * @property string $lang_title
 * @property integer $language_id
 *
 * @property Language $language
 */
class LanguageLang extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'language_lang';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['language_id', 'lang_title'], 'required'],
            [['language_id'], 'integer'],
            [['lang_title'], 'string', 'max' => 256]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'language_id' => Yii::t('app', 'Language ID'),
            'lang_title' => Yii::t('app', 'Lang Title'),
            'language_id' => Yii::t('app', 'Lang ID'),
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getLanguage()
    {
        return $this->hasOne(Language::className(), ['language_id' => 'language_id']);
    }
}
