Expenses contracts

This commit is contained in:
Илья Федотов 2024-05-19 19:18:06 +04:00
parent d94b4cbe44
commit ead38d06d3
6 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1,14 @@
using ElectronicsShopDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopContracts.BindingModels {
public class ExpensesBindingModel : IExpensesModel {
public int ClientID { get; set; }
public int Sum { get; set; }
public int OrderCount { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using ElectronicsShopContracts.BindingModels;
using ElectronicsShopContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopContracts.BusinessLogicContracts {
public interface IExpensesLogic {
ExpensesViewModel? ReadElement(ExpensesBindingModel model);
ExpensesViewModel? Create(ExpensesBindingModel model);
}
}

View File

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopContracts.SearchModels {
public class ExpensesSearchModel {
public int ClientID { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using ElectronicsShopContracts.BindingModels;
using ElectronicsShopContracts.SearchModels;
using ElectronicsShopContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopContracts.StorageContracts {
public interface IExpensesStorage {
ExpensesViewModel? GetElement(ExpensesSearchModel model);
ExpensesViewModel Create(ExpensesBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using ElectronicsShopDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopContracts.ViewModels {
public class ExpensesViewModel : IExpensesModel {
[DisplayName("Клиента ID")]
public int ClientID { get; set; }
[DisplayName("Сумма всех заказов")]
public int Sum { get; set; }
[DisplayName("Заказов всего")]
public int OrderCount { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ElectronicsShopDataModels.Models {
public interface IExpensesModel {
int ClientID { get; }
int Sum { get; }
int OrderCount { get; }
}
}