Distribution_GL Initialization

This commit is contained in:
2026-10-20 13:07:07 +05:30
commit 3f16e0cb44
194 changed files with 35659 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
using General_Ledger_Service.DTOs.Common;
namespace General_Ledger_Service.Services
{
// Shared ApiResponse success-path builder (01_Full_Development_Plan.md Section 10.4) - removes
// the repeated `new ApiResponse { StatusCode = ..., Success = true, ... }` block duplicated in
// nearly every Service method. Does not modify ApiResponse itself (CLAUDE.md Rule 1 foundation,
// off-limits without asking) - this is a separate builder file that constructs one.
internal static class ResponseHelpers
{
public static ApiResponse Ok(string message, object? data) => new()
{
StatusCode = StatusCodes.Status200OK,
Success = true,
Message = message,
Data = data
};
public static ApiResponse Created(string message, object? data) => new()
{
StatusCode = StatusCodes.Status201Created,
Success = true,
Message = message,
Data = data
};
}
}