<?php
    /**
     * Created by PhpStorm.
     * User: stes
     * Date: 16.02.18
     * Time: 11:05
     */
    
    namespace common\models;
    
    use artbox\core\models\Language;
    use yii2tech\filedb\ActiveRecord;
    
    class SettingsLang extends ActiveRecord
    {
        public static function fileName()
        {
            return 'settings_lang';
        }
        
        public function rules()
        {
            return [
                [
                    [
                        'settings_id',
                        'language_id',
                    ],
                    'integer',
                ],
                [
                    'about',
                    'string',
                ],
                
            ];
        }
        
        public function attributeLabels()
        {
            return [
                'about' => \Yii::t('core', 'About us'),
            ];
        }
    
        public function getLanguage()
        {
            return $this->hasOne(Language::className(), [ 'id' => 'language_id' ]);
        }
        
    }