feat: add ApiResponse and ApiResponse<T> records for improved API response handling

This commit is contained in:
HueByte
2026-02-21 18:00:10 +01:00
parent 7fadd08702
commit f96f70f09a
+4
View File
@@ -1,5 +1,9 @@
namespace EchoHub.Core.DTOs; namespace EchoHub.Core.DTOs;
public record ApiResponse(bool Success, string? Message = null, List<string>? Errors = null);
public record ApiResponse<T>(bool Success, string? Message = null, List<string>? Errors = null, T? Data = default);
public record ErrorResponse(string Error, string? Detail = null); public record ErrorResponse(string Error, string? Detail = null);
public record PaginatedResponse<T>(List<T> Items, int Total, int Offset, int Limit); public record PaginatedResponse<T>(List<T> Items, int Total, int Offset, int Limit);