This commit is contained in:
2024-01-19 17:25:56 +01:00
Unverified
parent ab9be442ee
commit 5d5a69ccf7
69 changed files with 3769 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
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")]
public string Message { get; set; }
[JsonProperty("success")]
[JsonPropertyName("success")]
public bool Success { get; set; }
[JsonProperty("action_code")]
[JsonPropertyName("action_code")]
public int ActionCode { get; set; }
}
public class APIResponse<T> : APIResponse
{
[JsonProperty("data")]
[JsonPropertyName("data")]
public T Data { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
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.Accounts
{
public class AuthenticationRequest
{
[JsonProperty("login_request_id")]
[JsonPropertyName("login_request_id")]
public Guid LoginRequestId { get; set; }
[JsonProperty("password")]
[JsonPropertyName("password")]
public string Password { get; set; }
}
}

View File

@@ -0,0 +1,29 @@
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.Accounts
{
public class CreateAccountRequest
{
[JsonProperty("first_name")]
[JsonPropertyName("first_name")]
public string FirstName { get; set; }
[JsonProperty("last_name")]
[JsonPropertyName("last_name")]
public string LastName { get; set; }
[JsonProperty("email")]
[JsonPropertyName("email")]
public string Email { get; set; }
[JsonProperty("phone_number")]
[JsonPropertyName("phone_number")]
public string PhoneNumber { get; set; }
}
}

View File

@@ -0,0 +1,25 @@
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.Accounts
{
public class GetPasswordVariantResponse
{
[JsonProperty("login_request_id")]
[JsonPropertyName("login_request_id")]
public Guid LoginRequestId { get; set; }
[JsonProperty("indexes")]
[JsonPropertyName("indexes")]
public int[] Indexes { get; set; }
[JsonProperty("valid_to")]
[JsonPropertyName("valid_to")]
public DateTime ValidTo { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
</Project>