namespace adas_core.Domain.Models.Responses;
///
/// Represents a generic response wrapper that encapsulates a payload of type along with associated response metadata.
///
/// The type of the payload contained within the response.
///
public class Response
{
///
/// Initializes a new instance of the class using default values.
///
///
public Response()
{
}
///
/// Initializes a new instance of the class representing a successful result, setting to true, to an empty string, to null, and storing the supplied payload in .
///
/// The payload to expose through .
///
public Response(T data)
{
Succeeded = true;
Message = string.Empty;
Errors = null;
Data = data;
}
public T? Data { get; set; }
public bool? Succeeded { get; set; }
public string[]? Errors { get; set; }
public string? Message { get; set; }
}
public record UpdateResponse(long Changes, T? Data);