add models in BankContracts

This commit is contained in:
Zakharov_Rostislav 2024-04-25 23:06:37 +04:00
parent 93bc15af03
commit 5f3f198f02
16 changed files with 233 additions and 6 deletions

View File

@ -7,11 +7,12 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="BindingModels\" />
<Folder Include="ViewModels\" />
<Folder Include="SearchModels\" />
<Folder Include="BisnessLogicsContracts\" />
<Folder Include="StoragesContracts\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BankDataModels\BankDataModels.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,18 @@
using BankDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.BindingModels
{
public class AccountBindingModel : IAccountModel
{
public int Id { get; set; }
public string Number { get; set; } = string.Empty;
public int Money { get; set; }
public DateOnly ReleaseDate { get; set; } = DateOnly.FromDateTime(DateTime.Now);
public int ManagerId { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using BankDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.BindingModels
{
public class ManagerBindingModel : IManagerModel
{
public int Id { get; set; }
public string Fio { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,19 @@
using BankDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.BindingModels
{
public class TransferBindingModel : ITransferModel
{
public int Id { get; set; }
public int Sum { get; set; }
public DateTime TransferTime { get; set; } = DateTime.Now;
public int? OperationId { get; set; }
public int SenderAccountId { get; set; }
public int RecipientAccountId { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using BankDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.BindingModels
{
public class WithdrawalBindingModel : IWithdrawalModel
{
public int Id { get; set; }
public DateTime WithdrawalTime { get; set; } = DateTime.Now;
public int? RequestId { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.SearchModels
{
public class AccountSearchModel
{
public int? Id { get; set; }
public string? Number { get; set; }
public DateOnly? ReleaseDate { get; set; }
public int? ManagerId { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.SearchModels
{
public class ManagerSearchModel
{
public int? Id { get; set; }
public string? Fio { get; set; }
public string? Email { get; set; }
public string? Password { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.SearchModels
{
public class TransferSearchModel
{
public int? Id { get; set; }
public DateTime? TransferTime { get; set; }
public int? OperationId { get; set; }
public int? SenderAccountId { get; set; }
public int? RecipientAccountId { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.SearchModels
{
public class WithdrawalSearchModel
{
public int? Id { get; set; }
public DateTime? WithdrawalTime { get; set; }
public int? RequestId { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using BankDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.ViewModels
{
public class AccountViewModel : IAccountModel
{
public int Id { get; set; }
[DisplayName("Номер счёта")]
public string Number { get; set; } = string.Empty;
[DisplayName("Деньги на счёте")]
public int Money { get; set; }
[DisplayName("Дата открытия")]
public DateOnly ReleaseDate { get; set; } = DateOnly.FromDateTime(DateTime.Now);
public int ManagerId { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using BankDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.ViewModels
{
public class ManagerViewModel : IManagerModel
{
public int Id { get; set; }
[DisplayName("ФИО менеджера")]
public string Fio { get; set; } = string.Empty;
[DisplayName("Email")]
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,28 @@
using BankDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.ViewModels
{
public class TransferViewModel : ITransferModel
{
[DisplayName("Номер перевода")]
public int Id { get; set; }
[DisplayName("Сумма")]
public int Sum { get; set; }
[DisplayName("Время")]
public DateTime TransferTime { get; set; } = DateTime.Now;
[DisplayName("Номер операции")]
public int? OperationId { get; set; }
public int SenderAccountId { get; set; }
public int RecipientAccountId { get; set; }
[DisplayName("Номер счёта отправителя")]
public string SenderAccountNumber { get; set; } = string.Empty;
[DisplayName("Номер счёта получателя")]
public string RecipientAccountNumber { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,20 @@
using BankDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.ViewModels
{
public class WithdrawalViewModel : IWithdrawalModel
{
[DisplayName("Номер выдачи")]
public int Id { get; set; }
[DisplayName("Время")]
public DateTime WithdrawalTime { get; set; } = DateTime.Now;
[DisplayName("Номер заявки")]
public int? RequestId { get; set; }
}
}

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace BankDataModels.Models
{
public interface IOperationModel
public interface IOperationModel : IId
{
int sum { get; set; }
DateTime OperationTime { get; set; }

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace BankDataModels.Models
{
public interface ITransferModel
public interface ITransferModel : IId
{
int Sum { get; set; }
DateTime TransferTime { get; set; }

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace BankDataModels.Models
{
public interface IWithdrawalModel
public interface IWithdrawalModel : IId
{
DateTime WithdrawalTime { get; set; }
int? RequestId { get; set; }