feat: 增强管理员权限管理,添加 RBAC 支持,更新 AdminUser 模型以处理角色和权限,更新登录接口返回权限信息,扩展数据库填充器以同步角色权限
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\V1\Admin\Reconcile;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\ReconcileJob;
|
||||
use App\Support\ApiResponse;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/** GET /api/v1/admin/reconcile-jobs/{reconcile_job} */
|
||||
final class ReconcileJobShowController extends Controller
|
||||
{
|
||||
public function __invoke(ReconcileJob $reconcile_job): JsonResponse
|
||||
{
|
||||
return ApiResponse::success([
|
||||
'id' => (int) $reconcile_job->id,
|
||||
'job_no' => $reconcile_job->job_no,
|
||||
'admin_user_id' => $reconcile_job->admin_user_id !== null ? (int) $reconcile_job->admin_user_id : null,
|
||||
'reconcile_type' => $reconcile_job->reconcile_type,
|
||||
'status' => $reconcile_job->status,
|
||||
'period_start' => $reconcile_job->period_start?->toIso8601String(),
|
||||
'period_end' => $reconcile_job->period_end?->toIso8601String(),
|
||||
'summary_json' => $reconcile_job->summary_json,
|
||||
'finished_at' => $reconcile_job->finished_at?->toIso8601String(),
|
||||
'created_at' => $reconcile_job->created_at?->toIso8601String(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user