mirror of
https://devops.lemonos.cn/lawson/FendxPHP.git
synced 2026-06-15 23:12:49 +08:00
feat(database): 添加用户角色权限系统及相关监控功能
- 创建用户表(users)包含基本信息和认证字段 - 创建角色表(roles)用于权限控制 - 创建权限表(permissions)定义系统权限 - 创建用户角色关联表(user_roles)建立用户与角色关系 - 创建角色权限关联表(role_permissions)建立角色与权限关系 - 创建迁移记录表(migrations)追踪数据库变更 - 添加AdminController提供管理员面板功能 - 实现系统监控、配置管理、缓存清理等功能 - 添加AOP切面编程支持的各种通知类型 - 实现告警管理AlertManager支持多渠道告警 - 添加文档注解接口规范
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Fendx\Database\Schema\Schema;
|
||||
use Fendx\Database\Migration;
|
||||
|
||||
/**
|
||||
* 创建迁移记录表
|
||||
*/
|
||||
class CreateMigrationsTable extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('migrations', function (Schema\Table $table) {
|
||||
$table->id('id')->primary()->autoIncrement();
|
||||
$table->string('migration', 255)->comment('迁移文件名');
|
||||
$table->integer('batch')->comment('批次号');
|
||||
$table->timestamp('ran_at')->useCurrent()->comment('执行时间');
|
||||
|
||||
// 索引
|
||||
$table->index('migration');
|
||||
$table->index('batch');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('migrations');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user