代码功能更新

This commit is contained in:
root
2025-05-18 07:42:27 +00:00
parent 7fc1d422a1
commit 4a90c41da2
2083 changed files with 695218 additions and 3 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
use think\migration\Migrator;
class AdminLoginLog extends Migrator
{
public function change()
{
$table = $this->table('admin_login_log', [
'engine' => 'InnoDB',
'comment' => '后台登录日志管理',
'collation' => 'utf8mb4_general_ci',
]);
//删除表
if ($table->exists()) {
$table->drop();
}
$table
->addColumn('login_status', 'boolean', ['limit' => 4, 'default' => '0', 'comment' => '登录状态.1=成功,2=失败'])
->addColumn('admin_id', 'integer', ['limit' => 11, 'default' => '0', 'comment' => '登录者'])
->addColumn('request_body', 'text', ['comment' => 'body参数'])
->addColumn('request_header', 'text', ['comment' => 'header参数'])
->addColumn('ip', 'string', ['limit' => 255, 'default' => '', 'comment' => 'ip'])
->addColumn('create_time', 'datetime', ['null' => 1, 'comment' => '创建时间'])
;
$table->create();
}
}