From f96f70f09ab8d412e1ad9deef94783dc3a5c2b64 Mon Sep 17 00:00:00 2001 From: HueByte Date: Sat, 21 Feb 2026 18:00:10 +0100 Subject: [PATCH] feat: add ApiResponse and ApiResponse records for improved API response handling --- src/EchoHub.Core/DTOs/CommonDtos.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/EchoHub.Core/DTOs/CommonDtos.cs b/src/EchoHub.Core/DTOs/CommonDtos.cs index 11e7de4..d41c4f6 100644 --- a/src/EchoHub.Core/DTOs/CommonDtos.cs +++ b/src/EchoHub.Core/DTOs/CommonDtos.cs @@ -1,5 +1,9 @@ namespace EchoHub.Core.DTOs; +public record ApiResponse(bool Success, string? Message = null, List? Errors = null); + +public record ApiResponse(bool Success, string? Message = null, List? Errors = null, T? Data = default); + public record ErrorResponse(string Error, string? Detail = null); public record PaginatedResponse(List Items, int Total, int Offset, int Limit);