This commit is contained in:
2026-03-17 15:55:20 +08:00
parent b34c44a590
commit cdc88ba1e4
2 changed files with 233 additions and 0 deletions
+31
View File
@@ -200,6 +200,37 @@ use OpenApi\Attributes as OA;
new OA\Property(property: 'created_at', type: 'string', format: 'date-time'),
]
)]
#[OA\Schema(
schema: 'OperationLogList',
type: 'object',
description: '操作日志列表项',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'user_id', type: 'integer', example: 1),
new OA\Property(property: 'action', type: 'string', example: 'user.create'),
new OA\Property(property: 'target_type', type: 'string', example: 'user'),
new OA\Property(property: 'target_id', type: 'integer', example: 5, nullable: true),
new OA\Property(property: 'description', type: 'string', example: '创建用户 test_user'),
new OA\Property(property: 'ip', type: 'string', example: '127.0.0.1', nullable: true),
new OA\Property(property: 'created_at', type: 'string', format: 'date-time'),
]
)]
#[OA\Schema(
schema: 'OperationLogDetail',
type: 'object',
description: '操作日志详情(含完整操作详情 JSON)',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'user_id', type: 'integer', example: 1),
new OA\Property(property: 'action', type: 'string', example: 'user.create'),
new OA\Property(property: 'target_type', type: 'string', example: 'user'),
new OA\Property(property: 'target_id', type: 'integer', example: 5, nullable: true),
new OA\Property(property: 'description', type: 'string', example: '创建用户 test_user'),
new OA\Property(property: 'detail', type: 'object', description: '操作详情 JSON', nullable: true),
new OA\Property(property: 'ip', type: 'string', example: '127.0.0.1', nullable: true),
new OA\Property(property: 'created_at', type: 'string', format: 'date-time'),
]
)]
class OpenApiSpec
{
}