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:
37
app/Controller/HomeController.php
Normal file
37
app/Controller/HomeController.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use Fendx\Core\Context\Context;
|
||||
|
||||
class HomeController
|
||||
{
|
||||
public function index(): array
|
||||
{
|
||||
return [
|
||||
'code' => 200,
|
||||
'message' => 'Welcome to FendxPHP Framework',
|
||||
'data' => [
|
||||
'framework' => 'FendxPHP',
|
||||
'version' => '1.0.0',
|
||||
'traceId' => Context::getTraceId(),
|
||||
'timestamp' => date('Y-m-d H:i:s'),
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function health(): array
|
||||
{
|
||||
return [
|
||||
'code' => 200,
|
||||
'message' => 'Health check passed',
|
||||
'data' => [
|
||||
'status' => 'healthy',
|
||||
'php_version' => PHP_VERSION,
|
||||
'memory_usage' => memory_get_usage(true),
|
||||
'traceId' => Context::getTraceId(),
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user