SUB_UNITHYDRO/Models/ApiResponse.cs

31 lines
840 B
C#
Raw Normal View History

2025-04-18 11:00:47 +08:00
using System.Text.Json.Serialization;
namespace FortranWebApi.Models
{
public class ApiResponse<T>
{
[JsonPropertyName("message")]
public string Message { get; set; } = "Success";
[JsonPropertyName("success")]
public bool Success { get; set; } = true;
[JsonPropertyName("data")]
public ApiResponseData<T>? Data { get; set; }
}
public class ApiResponseData<T>
{
[JsonPropertyName("contentType")]
public string? ContentType { get; set; }
[JsonPropertyName("serializerSettings")]
public object? SerializerSettings { get; set; }
[JsonPropertyName("statusCode")]
public int? StatusCode { get; set; }
[JsonPropertyName("value")]
public T? Value { get; set; }
}
}