add models in BankContracts
This commit is contained in:
parent
93bc15af03
commit
5f3f198f02
@ -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>
|
||||
|
18
Bank/BankContracts/BindingModels/AccountBindingModel.cs
Normal file
18
Bank/BankContracts/BindingModels/AccountBindingModel.cs
Normal 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; }
|
||||
}
|
||||
}
|
17
Bank/BankContracts/BindingModels/ManagerBindingModel.cs
Normal file
17
Bank/BankContracts/BindingModels/ManagerBindingModel.cs
Normal 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;
|
||||
}
|
||||
}
|
19
Bank/BankContracts/BindingModels/TransferBindingModel.cs
Normal file
19
Bank/BankContracts/BindingModels/TransferBindingModel.cs
Normal 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; }
|
||||
}
|
||||
}
|
16
Bank/BankContracts/BindingModels/WithdrawalBindingModel.cs
Normal file
16
Bank/BankContracts/BindingModels/WithdrawalBindingModel.cs
Normal 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; }
|
||||
}
|
||||
}
|
16
Bank/BankContracts/SearchModels/AccountSearchModel.cs
Normal file
16
Bank/BankContracts/SearchModels/AccountSearchModel.cs
Normal 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; }
|
||||
}
|
||||
}
|
16
Bank/BankContracts/SearchModels/ManagerSearchModel.cs
Normal file
16
Bank/BankContracts/SearchModels/ManagerSearchModel.cs
Normal 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; }
|
||||
}
|
||||
}
|
17
Bank/BankContracts/SearchModels/TransferSearchModel.cs
Normal file
17
Bank/BankContracts/SearchModels/TransferSearchModel.cs
Normal 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; }
|
||||
}
|
||||
}
|
15
Bank/BankContracts/SearchModels/WithdrawalSearchModel.cs
Normal file
15
Bank/BankContracts/SearchModels/WithdrawalSearchModel.cs
Normal 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; }
|
||||
}
|
||||
}
|
22
Bank/BankContracts/ViewModels/AccountViewModel.cs
Normal file
22
Bank/BankContracts/ViewModels/AccountViewModel.cs
Normal 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; }
|
||||
}
|
||||
}
|
22
Bank/BankContracts/ViewModels/ManagerViewModel.cs
Normal file
22
Bank/BankContracts/ViewModels/ManagerViewModel.cs
Normal 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;
|
||||
}
|
||||
}
|
28
Bank/BankContracts/ViewModels/TransferViewModel.cs
Normal file
28
Bank/BankContracts/ViewModels/TransferViewModel.cs
Normal 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;
|
||||
}
|
||||
}
|
20
Bank/BankContracts/ViewModels/WithdrawalViewModel.cs
Normal file
20
Bank/BankContracts/ViewModels/WithdrawalViewModel.cs
Normal 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; }
|
||||
}
|
||||
}
|
@ -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; }
|
||||
|
@ -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; }
|
||||
|
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user