<?php

namespace backend\models;

use backend\models\query\SystemLogQuery;
use Yii;

/**
 * This is the model class for table "system_log".
 *
 * @property integer $id
 * @property integer $level
 * @property string $category
 * @property integer $log_time
 * @property string $prefix
 * @property integer $message
 */
class SystemLog extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%system_log}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['level', 'log_time', 'message'], 'integer'],
            [['log_time'], 'required'],
            [['prefix'], 'string'],
            [['category'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('common', 'ID'),
            'level' => Yii::t('common', 'Level'),
            'category' => Yii::t('common', 'Category'),
            'log_time' => Yii::t('common', 'Log Time'),
            'prefix' => Yii::t('common', 'Prefix'),
            'message' => Yii::t('common', 'Message'),
        ];
    }
}
