3. Доделаны Model and BindingModel

This commit is contained in:
Nap 2023-04-06 22:47:23 +04:00
parent b54b879743
commit 310fb183e1
13 changed files with 170 additions and 2 deletions

View File

@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace BankContracts.BindingModels namespace BankContracts.BindingModels
{ {
internal class ClientBindingModel : IClientModel public class ClientBindingModel : IClientModel
{ {
public int Id { get; set; } public int Id { get; set; }
public string Login { get; set; } = string.Empty; public string Login { get; set; } = string.Empty;

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.BindingModels
{
public class DealBindingModel
{
public int Id { get; set; }
public DateTime DateConclusions { get; set; } = DateTime.Now;
public DateTime DateClose { get; set; } = DateTime.Now;
public int ClientId { get; set; }
}
}

View File

@ -9,5 +9,9 @@ namespace BankContracts.BindingModels
{ {
public class ExpensesBindingModel : IExpensesModel public class ExpensesBindingModel : IExpensesModel
{ {
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public decimal Cost { get; set; }
public int WorkerId { get; set; }
} }
} }

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.BindingModels
{
internal class ExpensesForDealBindingModel
{
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.BindingModels
{
internal class OperationsBindingModel
{
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.BindingModels
{
internal class OperationsInDealBindingModel
{
}
}

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 PaymentBindingModel : IPaymentModel
{
public int Id { get; set; }
public decimal Sum { get; set; }
public decimal PaidSum { get; set; }
public int OperationsInDealId { get; set; }
}
}

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankDataModels.Models
{
/// <summary>
/// Сделка
/// </summary>
public interface IDeal : IId
{
/// <summary>
/// дата заключения
/// </summary>
DateTime DateConclusions { get; }
/// <summary>
/// дата закрытия
/// </summary>
DateTime DateClose { get; }
/// <summary>
/// Клиент id
/// </summary>
int ClientId { get; }
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankDataModels.Models
{
internal class IExpensesForDeal
{
}
}

View File

@ -19,6 +19,10 @@ namespace BankDataModels.Models
/// <summary> /// <summary>
/// Стоимость /// Стоимость
/// </summary> /// </summary>
double Cost { get; } decimal Cost { get; }
/// <summary>
/// Сотрудник id
/// </summary>
int WorkerId { get; }
} }
} }

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankDataModels.Models
{
internal class IOperationsInDealModel
{
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankDataModels.Models
{
internal class IOperationsModel
{
}
}

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankDataModels.Models
{
/// <summary>
/// Оплата
/// </summary>
public interface IPaymentModel : IId
{
/// <summary>
/// Стоимость
/// </summary>
decimal Sum { get; }
/// <summary>
/// Оплаченная сумма
/// </summary>
decimal PaidSum { get; }
/// <summary>
/// Операции в сделке ID
/// </summary>
int OperationsInDealId { get; }
}
}