<?php

namespace backend\models;

use Yii;

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

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['lang_code', 'language_name'], 'required'],
            [['is_default', 'active'], 'boolean'],
            [['lang_code'], 'string', 'max' => 4],
            [['language_name'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'language_id' => Yii::t('app', 'Language ID'),
            'lang_code' => Yii::t('app', 'Lang Code'),
            'is_default' => Yii::t('app', 'Is Default'),
            'language_name' => Yii::t('app', 'Language Name'),
            'active' => Yii::t('app', 'Active'),
        ];
    }
}
