2024-01-19 17:25:56 +01:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace SecureBank.Common
|
|
|
|
|
|
{
|
|
|
|
|
|
public class APIResponse
|
|
|
|
|
|
{
|
|
|
|
|
|
[JsonProperty("message")]
|
|
|
|
|
|
[JsonPropertyName("message")]
|
2024-01-23 15:41:59 +01:00
|
|
|
|
public string? Message { get; set; }
|
2024-01-19 17:25:56 +01:00
|
|
|
|
|
2024-01-23 15:41:59 +01:00
|
|
|
|
[JsonProperty("status")]
|
|
|
|
|
|
[JsonPropertyName("status")]
|
|
|
|
|
|
public ResponseStatus Status { get; set; } = ResponseStatus.Ok;
|
2024-01-19 17:25:56 +01:00
|
|
|
|
|
|
|
|
|
|
[JsonProperty("action_code")]
|
|
|
|
|
|
[JsonPropertyName("action_code")]
|
2024-01-23 15:41:59 +01:00
|
|
|
|
public int? ActionCode { get; set; }
|
2024-01-19 17:25:56 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class APIResponse<T> : APIResponse
|
|
|
|
|
|
{
|
|
|
|
|
|
[JsonProperty("data")]
|
|
|
|
|
|
[JsonPropertyName("data")]
|
2024-01-23 15:41:59 +01:00
|
|
|
|
public T? Data { get; set; }
|
2024-01-19 17:25:56 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|