final1
This commit is contained in:
@@ -12,21 +12,21 @@ namespace SecureBank.Common
|
||||
{
|
||||
[JsonProperty("message")]
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
public string? Message { get; set; }
|
||||
|
||||
[JsonProperty("success")]
|
||||
[JsonPropertyName("success")]
|
||||
public bool Success { get; set; }
|
||||
[JsonProperty("status")]
|
||||
[JsonPropertyName("status")]
|
||||
public ResponseStatus Status { get; set; } = ResponseStatus.Ok;
|
||||
|
||||
[JsonProperty("action_code")]
|
||||
[JsonPropertyName("action_code")]
|
||||
public int ActionCode { get; set; }
|
||||
public int? ActionCode { get; set; }
|
||||
}
|
||||
|
||||
public class APIResponse<T> : APIResponse
|
||||
{
|
||||
[JsonProperty("data")]
|
||||
[JsonPropertyName("data")]
|
||||
public T Data { get; set; }
|
||||
public T? Data { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
78
SecureBank.Common/Accounts/AccountResponse.cs
Normal file
78
SecureBank.Common/Accounts/AccountResponse.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SecureBank.Common.Accounts
|
||||
{
|
||||
public class AccountResponse
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
[JsonPropertyName("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[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; }
|
||||
|
||||
[JsonProperty("address")]
|
||||
[JsonPropertyName("address")]
|
||||
public string Address { get; set; }
|
||||
|
||||
[JsonProperty("pesel")]
|
||||
[JsonPropertyName("pesel")]
|
||||
public string PESEL { get; set; }
|
||||
|
||||
[JsonProperty("id_card_number")]
|
||||
[JsonPropertyName("id_card_number")]
|
||||
public string IdCardNumber { get; set; }
|
||||
|
||||
[JsonProperty("iban")]
|
||||
[JsonPropertyName("iban")]
|
||||
public string IBAN { get; set; }
|
||||
|
||||
[JsonProperty("card_number")]
|
||||
[JsonPropertyName("card_number")]
|
||||
public string CardNumber { get; set; }
|
||||
|
||||
[JsonProperty("card_expiration_date")]
|
||||
[JsonPropertyName("card_expiration_date")]
|
||||
public string CardExpirationDate { get; set; }
|
||||
|
||||
[JsonProperty("card_cvv")]
|
||||
[JsonPropertyName("card_cvv")]
|
||||
public string CardCVV { get; set; }
|
||||
|
||||
[JsonProperty("is_admin")]
|
||||
[JsonPropertyName("is_admin")]
|
||||
public bool IsAdmin { get; set; }
|
||||
|
||||
[JsonProperty("login_failed_count")]
|
||||
[JsonPropertyName("login_failed_count")]
|
||||
public int LoginFailedCount { get; set; }
|
||||
|
||||
[JsonProperty("temporary_password")]
|
||||
[JsonPropertyName("temporary_password")]
|
||||
public bool TemporaryPassword { get; set; }
|
||||
|
||||
[JsonProperty("lock_reason")]
|
||||
[JsonPropertyName("lock_reason")]
|
||||
public string? LockReason { get; set; }
|
||||
}
|
||||
}
|
||||
17
SecureBank.Common/Accounts/ChangePasswordRequest.cs
Normal file
17
SecureBank.Common/Accounts/ChangePasswordRequest.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
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 ChangePasswordRequest
|
||||
{
|
||||
[JsonProperty("password")]
|
||||
[JsonPropertyName("password")]
|
||||
public string Password { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -25,5 +25,17 @@ namespace SecureBank.Common.Accounts
|
||||
[JsonProperty("phone_number")]
|
||||
[JsonPropertyName("phone_number")]
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
[JsonProperty("address")]
|
||||
[JsonPropertyName("address")]
|
||||
public string Address { get; set; }
|
||||
|
||||
[JsonProperty("pesel")]
|
||||
[JsonPropertyName("pesel")]
|
||||
public string PESEL { get; set; }
|
||||
|
||||
[JsonProperty("id_card_number")]
|
||||
[JsonPropertyName("id_card_number")]
|
||||
public string IdCardNumber { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
15
SecureBank.Common/ResponseStatus.cs
Normal file
15
SecureBank.Common/ResponseStatus.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SecureBank.Common
|
||||
{
|
||||
public enum ResponseStatus
|
||||
{
|
||||
Ok,
|
||||
Unauthorized,
|
||||
BadRequest
|
||||
}
|
||||
}
|
||||
45
SecureBank.Common/Transfers/CreateAdminTransferRequest.cs
Normal file
45
SecureBank.Common/Transfers/CreateAdminTransferRequest.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
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.Transfers
|
||||
{
|
||||
public class CreateAdminTransferRequest
|
||||
{
|
||||
[JsonProperty("sender_account_number")]
|
||||
[JsonPropertyName("sender_account_number")]
|
||||
public string SenderAccountNumber { get; set; }
|
||||
|
||||
[JsonProperty("sender_name")]
|
||||
[JsonPropertyName("sender_name")]
|
||||
public string? SenderName { get; set; }
|
||||
|
||||
[JsonProperty("sender_address")]
|
||||
[JsonPropertyName("sender_address")]
|
||||
public string? SenderAddress { get; set; }
|
||||
|
||||
[JsonProperty("receiver_account_number")]
|
||||
[JsonPropertyName("receiver_account_number")]
|
||||
public string ReceiverAccountNumber { get; set; }
|
||||
|
||||
[JsonProperty("receiver_name")]
|
||||
[JsonPropertyName("receiver_name")]
|
||||
public string? ReceiverName { get; set; }
|
||||
|
||||
[JsonProperty("receiver_address")]
|
||||
[JsonPropertyName("receiver_address")]
|
||||
public string? ReceiverAddress { get; set; }
|
||||
|
||||
[JsonProperty("title")]
|
||||
[JsonPropertyName("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("amount")]
|
||||
[JsonPropertyName("amount")]
|
||||
public decimal Amount { get; set; }
|
||||
}
|
||||
}
|
||||
34
SecureBank.Common/Transfers/CreateUserTransferRequest.cs
Normal file
34
SecureBank.Common/Transfers/CreateUserTransferRequest.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
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.Transfers
|
||||
{
|
||||
public class CreateUserTransferRequest
|
||||
{
|
||||
|
||||
[JsonProperty("receiver_account_number")]
|
||||
[JsonPropertyName("receiver_account_number")]
|
||||
public string ReceiverAccountNumber { get; set; }
|
||||
|
||||
[JsonProperty("receiver_name")]
|
||||
[JsonPropertyName("receiver_name")]
|
||||
public string? ReceiverName { get; set; }
|
||||
|
||||
[JsonProperty("receiver_address")]
|
||||
[JsonPropertyName("receiver_address")]
|
||||
public string? ReceiverAddress { get; set; }
|
||||
|
||||
[JsonProperty("title")]
|
||||
[JsonPropertyName("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("amount")]
|
||||
[JsonPropertyName("amount")]
|
||||
public decimal Amount { get; set; }
|
||||
}
|
||||
}
|
||||
54
SecureBank.Common/Transfers/TransferResponse.cs
Normal file
54
SecureBank.Common/Transfers/TransferResponse.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SecureBank.Common.Transfers
|
||||
{
|
||||
public class TransferResponse
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
[JsonPropertyName("id")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[JsonProperty("sender_account_number")]
|
||||
[JsonPropertyName("sender_account_number")]
|
||||
public string SenderAccountNumber { get; set; }
|
||||
|
||||
[JsonProperty("sender_name")]
|
||||
[JsonPropertyName("sender_name")]
|
||||
public string? SenderName { get; set; }
|
||||
|
||||
[JsonProperty("sender_address")]
|
||||
[JsonPropertyName("sender_address")]
|
||||
public string? SenderAddress { get; set; }
|
||||
|
||||
[JsonProperty("receiver_account_number")]
|
||||
[JsonPropertyName("receiver_account_number")]
|
||||
public string ReceiverAccountNumber { get; set; }
|
||||
|
||||
[JsonProperty("receiver_name")]
|
||||
[JsonPropertyName("receiver_name")]
|
||||
public string? ReceiverName { get; set; }
|
||||
|
||||
[JsonProperty("receiver_address")]
|
||||
[JsonPropertyName("receiver_address")]
|
||||
public string? ReceiverAddress { get; set; }
|
||||
|
||||
[JsonProperty("amount")]
|
||||
[JsonPropertyName("amount")]
|
||||
public decimal Amount { get; set; }
|
||||
|
||||
[JsonProperty("title")]
|
||||
[JsonPropertyName("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[JsonProperty("date")]
|
||||
[JsonPropertyName("date")]
|
||||
public DateTime Date { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user