From 147ed7ad07bf474981dec324ff9c46bc74a3f01d Mon Sep 17 00:00:00 2001 From: the Date: Mon, 17 Jun 2024 14:32:12 +0400 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8C=D1=8E=D1=88=D0=BA=D0=B8=20(=D1=81?= =?UTF-8?q?=D0=BB=D0=B5=D0=B3=D0=BA=D0=B0=20=D0=BE=D1=82=D0=BB=D0=B8=D1=87?= =?UTF-8?q?=D0=B0=D1=8E=D1=82=D1=81=D1=8F=20=D0=BE=D1=82=20=D1=81=D1=85?= =?UTF-8?q?=D0=B5=D0=BC=D1=8B,=20=D0=BE=D1=81=D0=BE=D0=B1=D0=B5=D0=BD?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=B4=D0=BB=D1=8F=20=D0=B4=D0=BE=D0=BA=D1=83?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D1=82=D0=B0),=20=D0=BC=D0=BE=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D0=B8=20=D0=BF=D0=BE=D0=B8=D1=81=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessLogicContracts/IProductLogic.cs | 17 +++++++++++++++++ .../SearchModels/MediaFileSearchModel.cs | 14 ++++++++++++++ Contracts/SearchModels/SupplierSearchModel.cs | 16 ++++++++++++++++ .../SearchModels/SupplyDocSearchModel.cs | 15 +++++++++++++++ Contracts/SearchModels/SupplySearchModel.cs | 16 ++++++++++++++++ Contracts/ViewModels/MediaFileViewModel.cs | 14 ++++++++++++++ Contracts/ViewModels/ProductViewModel.cs | 17 +++++++++++++++++ Contracts/ViewModels/SupplierViewModel.cs | 15 +++++++++++++++ Contracts/ViewModels/SupplyDocViewModel.cs | 14 ++++++++++++++ Contracts/ViewModels/SupplyViewModel.cs | 19 +++++++++++++++++++ 10 files changed, 157 insertions(+) create mode 100644 Contracts/BusinessLogicContracts/IProductLogic.cs create mode 100644 Contracts/SearchModels/MediaFileSearchModel.cs create mode 100644 Contracts/SearchModels/SupplierSearchModel.cs create mode 100644 Contracts/SearchModels/SupplyDocSearchModel.cs create mode 100644 Contracts/SearchModels/SupplySearchModel.cs create mode 100644 Contracts/ViewModels/MediaFileViewModel.cs create mode 100644 Contracts/ViewModels/ProductViewModel.cs create mode 100644 Contracts/ViewModels/SupplierViewModel.cs create mode 100644 Contracts/ViewModels/SupplyDocViewModel.cs create mode 100644 Contracts/ViewModels/SupplyViewModel.cs diff --git a/Contracts/BusinessLogicContracts/IProductLogic.cs b/Contracts/BusinessLogicContracts/IProductLogic.cs new file mode 100644 index 0000000..b19b8e8 --- /dev/null +++ b/Contracts/BusinessLogicContracts/IProductLogic.cs @@ -0,0 +1,17 @@ +using Contracts.BindingModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Contracts.BusinessLogicContracts +{ + public interface IProductLogic + { + bool Create(ProductBindingModel model); + bool Update(ProductBindingModel model); + bool Delete(ProductBindingModel model); + + } +} diff --git a/Contracts/SearchModels/MediaFileSearchModel.cs b/Contracts/SearchModels/MediaFileSearchModel.cs new file mode 100644 index 0000000..7c81b55 --- /dev/null +++ b/Contracts/SearchModels/MediaFileSearchModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Contracts.SearchModels +{ + public class MediaFileSearchModel + { + public Guid? Id { get; set; } + public Guid? ProductId { get; set; } + } +} diff --git a/Contracts/SearchModels/SupplierSearchModel.cs b/Contracts/SearchModels/SupplierSearchModel.cs new file mode 100644 index 0000000..2082afa --- /dev/null +++ b/Contracts/SearchModels/SupplierSearchModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Contracts.SearchModels +{ + public class SupplierSearchModel + { + public Guid? Id { get; set; } + public string? Name { get; set; } + public List? AvailibleProducts { get; set; } + public int? Deals { get; set; } + } +} diff --git a/Contracts/SearchModels/SupplyDocSearchModel.cs b/Contracts/SearchModels/SupplyDocSearchModel.cs new file mode 100644 index 0000000..017227a --- /dev/null +++ b/Contracts/SearchModels/SupplyDocSearchModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Contracts.SearchModels +{ + public class SupplyDocSearchModel + { + public Guid? Id { get; set; } + public string? Name { get; set; } + public Guid? SupplyId { get; set; } + } +} diff --git a/Contracts/SearchModels/SupplySearchModel.cs b/Contracts/SearchModels/SupplySearchModel.cs new file mode 100644 index 0000000..9f50d53 --- /dev/null +++ b/Contracts/SearchModels/SupplySearchModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Contracts.SearchModels +{ + public class SupplySearchModel + { + public Guid? Id { get; set; } + public List? Products { get; set; } + public DateTime? DateStart { get; set; } + public DateTime? DateEnd { get; set; } + } +} diff --git a/Contracts/ViewModels/MediaFileViewModel.cs b/Contracts/ViewModels/MediaFileViewModel.cs new file mode 100644 index 0000000..d2ca0f6 --- /dev/null +++ b/Contracts/ViewModels/MediaFileViewModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Contracts.ViewModels +{ + public class MediaFileViewModel + { + public Guid Id { get; set; } + public string Location { get; set; } = string.Empty; + } +} diff --git a/Contracts/ViewModels/ProductViewModel.cs b/Contracts/ViewModels/ProductViewModel.cs new file mode 100644 index 0000000..4a5d4fd --- /dev/null +++ b/Contracts/ViewModels/ProductViewModel.cs @@ -0,0 +1,17 @@ +using DataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Contracts.ViewModels +{ + public class ProductViewModel + { + public Guid Id { get; set; } + public string Name { get; set; } = string.Empty; + public int Price { get; set; } + public List MediaFiles { get; set; } = new(); + } +} diff --git a/Contracts/ViewModels/SupplierViewModel.cs b/Contracts/ViewModels/SupplierViewModel.cs new file mode 100644 index 0000000..337dc1d --- /dev/null +++ b/Contracts/ViewModels/SupplierViewModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Contracts.ViewModels +{ + public class SupplierViewModel + { + public Guid Id { get; set; } + public string Name { get; set; } = string.Empty; + public Dictionary AvailibleProducts = new(); + } +} diff --git a/Contracts/ViewModels/SupplyDocViewModel.cs b/Contracts/ViewModels/SupplyDocViewModel.cs new file mode 100644 index 0000000..7f8a084 --- /dev/null +++ b/Contracts/ViewModels/SupplyDocViewModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Contracts.ViewModels +{ + public class SupplyDocViewModel + { + public Guid Id { get; set; } + public string Name { get; set; } = string.Empty; + } +} diff --git a/Contracts/ViewModels/SupplyViewModel.cs b/Contracts/ViewModels/SupplyViewModel.cs new file mode 100644 index 0000000..9dca657 --- /dev/null +++ b/Contracts/ViewModels/SupplyViewModel.cs @@ -0,0 +1,19 @@ +using DataModels.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Contracts.ViewModels +{ + public class SupplyViewModel + { + public Guid Id { get; set; } + public string SupplierName { get; set; } = string.Empty; + public double Price { get; set; } + public Dictionary Products { get; set; } = new(); + public DateTime Date { get; set; } + public SupplyStatus Status { get; set; } + } +}