50 lines
861 B
PHP
Executable File
50 lines
861 B
PHP
Executable File
<?php
|
|
|
|
namespace common\models;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "log".
|
|
*
|
|
* @property string $username
|
|
* @property string $ip
|
|
* @property string $data
|
|
* @property string $create_time
|
|
*/
|
|
class CLog extends \yii\db\ActiveRecord
|
|
{
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return '{{%c_log}}';
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['username'], 'string', 'max' => 32],
|
|
[['ip'], 'string', 'max' => 64],
|
|
[['data'], 'string', 'max' => 500],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'username' => 'Username',
|
|
'ip' => 'Ip',
|
|
'data' => 'Data',
|
|
'create_time' => 'Create Time',
|
|
];
|
|
}
|
|
}
|