init
This commit is contained in:
32
SecureBank.Common/APIResponse.cs
Normal file
32
SecureBank.Common/APIResponse.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
21
SecureBank.Common/Accounts/AuthenticationRequest.cs
Normal file
21
SecureBank.Common/Accounts/AuthenticationRequest.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
29
SecureBank.Common/Accounts/CreateAccountRequest.cs
Normal file
29
SecureBank.Common/Accounts/CreateAccountRequest.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
25
SecureBank.Common/Accounts/GetPasswordVariantResponse.cs
Normal file
25
SecureBank.Common/Accounts/GetPasswordVariantResponse.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
13
SecureBank.Common/SecureBank.Common.csproj
Normal file
13
SecureBank.Common/SecureBank.Common.csproj
Normal 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>
|
||||
Reference in New Issue
Block a user