Compare commits

..

30 Commits

Author SHA1 Message Date
bekodeg
1f922905b0 Merge branch 'BACKDEV-405' of https://git.is.ulstu.ru/bekodeg/ComputerHardwareStore_YouAreProgrammer into BACKDEV-405 2024-04-25 21:41:45 +04:00
03da9f0eda links 2024-04-25 21:41:31 +04:00
81907df9cf + links 2024-04-25 21:41:31 +04:00
9945ff4bb2 + vendor 2024-04-25 21:41:31 +04:00
9573c340ba business logicc ontracts 2024-04-25 21:41:31 +04:00
bekodeg
2023ac13c7 pull 2024-04-25 21:39:47 +04:00
b2c7cd9858 Merge pull request 'BACKDEV-401' (#7) from BACKDEV-401 into dev
Reviewed-on: #7
2024-04-25 17:47:17 +04:00
72ebbc11f9 Merge pull request 'BACKDEV-406' (#6) from BACKDEV-406 into dev
Reviewed-on: #6
2024-04-25 17:46:17 +04:00
930e4ed316 ссылки using 2024-04-24 19:21:18 +04:00
b48619623e Merge pull request 'BACKDEV-404' (#4) from BACKDEV-404 into dev
Reviewed-on: #4
2024-04-24 19:10:39 +04:00
bff0214329 Merge pull request 'searchmodels, нужно ли для коммента?' (#3) from BACKDEV-403 into dev
Reviewed-on: #3
2024-04-24 19:09:31 +04:00
8e96befcd6 links 2024-04-24 19:09:02 +04:00
14b3bbd20e + links 2024-04-24 19:08:37 +04:00
6b8a7a5d1b Merge pull request 'viewmodels' (#2) from BACKDEV-402 into dev
Reviewed-on: #2
2024-04-24 19:08:14 +04:00
40f96fe6c1 + vendor 2024-04-24 19:08:06 +04:00
65599c80a2 storage contract 2024-04-24 18:53:25 +04:00
c70fddda2c business logicc ontracts 2024-04-24 18:37:36 +04:00
d48b7ac0de bindingmodels 2024-04-18 16:47:15 +04:00
176b3bfc9d searchmodels, но нужно ли для коммента? 2024-04-18 15:32:47 +04:00
eee043483a Revert "searchmodels (не знаю, нужна ли модель для коммента, но сделала)"
This reverts commit 8b9ee21fb9.
2024-04-18 15:30:21 +04:00
8b9ee21fb9 searchmodels (не знаю, нужна ли модель для коммента, но сделала) 2024-04-18 15:29:39 +04:00
1a9edefdb9 viewmodels 2024-04-18 15:03:40 +04:00
bekodeg
f952809b0e добавил 2024-04-17 22:21:46 +04:00
bekodeg
09f64c788f создание проекта с контрактами 2024-04-17 22:06:25 +04:00
bekodeg
552c06f55e косячок 2024-04-17 22:06:08 +04:00
bekodeg
d7c2bc8e24 Merge branch 'dev' of https://git.is.ulstu.ru/bekodeg/ComputerHardwareStore_YouAreProgrammer into dev 2024-04-17 22:01:50 +04:00
bekodeg
a328d413fa создание проекта с контрактами 2024-04-17 22:01:38 +04:00
bekodeg
f6c69273df небольшие изменения 2024-04-17 21:54:05 +04:00
5bde6633c4 Merge pull request 'Создание моделей данных' (#1) from BACKDEV-401 into dev
Reviewed-on: #1
2024-04-17 21:47:28 +04:00
bekodeg
8049b51388 Создание моделей данных 2024-04-17 21:44:51 +04:00
50 changed files with 631 additions and 0 deletions

View File

@ -5,6 +5,10 @@ VisualStudioVersion = 17.7.34031.279
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerHardwareStore", "ComputerHardwareStore\ComputerHardwareStore.csproj", "{D5DDEE2B-A0C4-430B-B00E-452BA1AB3DDA}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerHardwareStore", "ComputerHardwareStore\ComputerHardwareStore.csproj", "{D5DDEE2B-A0C4-430B-B00E-452BA1AB3DDA}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerHardwareStoreDataModels", "ComputerHardwareStoreDataModels\ComputerHardwareStoreDataModels.csproj", "{48126915-C6D4-451C-BC88-39E3C50332B8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerHardwareStoreContracts", "ComputerHardwareStoreContracts\ComputerHardwareStoreContracts.csproj", "{5F394E21-2597-432B-AE73-BBAFD8D9F50E}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -15,6 +19,14 @@ Global
{D5DDEE2B-A0C4-430B-B00E-452BA1AB3DDA}.Debug|Any CPU.Build.0 = Debug|Any CPU {D5DDEE2B-A0C4-430B-B00E-452BA1AB3DDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5DDEE2B-A0C4-430B-B00E-452BA1AB3DDA}.Release|Any CPU.ActiveCfg = Release|Any CPU {D5DDEE2B-A0C4-430B-B00E-452BA1AB3DDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5DDEE2B-A0C4-430B-B00E-452BA1AB3DDA}.Release|Any CPU.Build.0 = Release|Any CPU {D5DDEE2B-A0C4-430B-B00E-452BA1AB3DDA}.Release|Any CPU.Build.0 = Release|Any CPU
{48126915-C6D4-451C-BC88-39E3C50332B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48126915-C6D4-451C-BC88-39E3C50332B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48126915-C6D4-451C-BC88-39E3C50332B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48126915-C6D4-451C-BC88-39E3C50332B8}.Release|Any CPU.Build.0 = Release|Any CPU
{5F394E21-2597-432B-AE73-BBAFD8D9F50E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5F394E21-2597-432B-AE73-BBAFD8D9F50E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F394E21-2597-432B-AE73-BBAFD8D9F50E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F394E21-2597-432B-AE73-BBAFD8D9F50E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -0,0 +1,13 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class BuildBindingModel : IBindingModel
{
public int Id { get; set; }
public string BuildName { get; set; } = string.Empty;
public double Price { get; set; }
public int VendorId { get; set; }
public Dictionary<int, (IComponentModel, int)> BuildComponent { get; set; } = new();
}
}

View File

@ -0,0 +1,12 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class CommentBindingModel : ICommentModel
{
public int Id { get; set; }
public DateTime Date { get; set; } = DateTime.Now;
public string Text { get; set; } = string.Empty;
public int BuildId { get; set; }
}
}

View File

@ -0,0 +1,11 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class ComponentBindingModel : IComponentModel
{
public int Id { get; set; }
public string ComponentName { get; set; } = string.Empty;
public double Cost { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class OrderBindingModel : IOrderModel
{
public int Id { get; set; }
public int CannedId { get; set; }
public int Count { get; set; }
public double Sum { get; set; }
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
public DateTime DateCreate { get; set; } = DateTime.Now;
public DateTime? DateImplement { get; set; }
}
}

View File

@ -0,0 +1,12 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class ProductBindingModel : IProductModel
{
public int Id { get; set; }
public string ProductName { get; set; } = string.Empty;
public double Price { get; set; }
public Dictionary<int, (IComponentModel, int)> ProductComponents { get; set; } = new();
}
}

View File

@ -0,0 +1,15 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class PurchaseBindingModel : IPurchaseModel
{
public int Id { get; set; }
public double Cost { get; set; }
public DateTime DateCreate { get; set; }
public int VendorId { get; set; }
public double Sum { get; set; }
public Dictionary<int, (IBuildModel, int)> PurchaseBuild { get; set; } = new();
public Dictionary<int, (IProductModel, int)> PurchaseProduct { get; set; } = new();
}
}

View File

@ -0,0 +1,12 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class StoreKeeperBindingModel : IStoreKeeperModel
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,12 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class VendorBindingModel : IVendorModel
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,15 @@
using ComputerHardwareStoreContracts.BindingModels;
using ComputerHardwareStoreContracts.SearchModels;
using ComputerHardwareStoreContracts.ViewModels;
namespace ComputerHardwareStoreContracts.BusinessLogicsContracts
{
public interface IComponentLogic
{
List<ComponentViewModel>? ReadList(ComponentSearchModel? model);
ComponentViewModel? ReadElement(ComponentSearchModel model);
bool Create(ComponentBindingModel model);
bool Update(ComponentBindingModel model);
bool Delete(ComponentBindingModel model);
}
}

View File

@ -0,0 +1,15 @@
using ComputerHardwareStoreContracts.BindingModels;
using ComputerHardwareStoreContracts.SearchModels;
using ComputerHardwareStoreContracts.ViewModels;
namespace ComputerHardwareStoreContracts.BusinessLogicsContracts
{
public interface IOrderLogic
{
List<OrderViewModel>? ReadList(OrderSearchModel? model);
bool CreateOrder(OrderBindingModel model);
bool TakeOrderInWork(OrderBindingModel model);
bool FinishOrder(OrderBindingModel model);
bool DeliveryOrder(OrderBindingModel model);
}
}

View File

@ -0,0 +1,15 @@
using ComputerHardwareStoreContracts.BindingModels;
using ComputerHardwareStoreContracts.SearchModels;
using ComputerHardwareStoreContracts.ViewModels;
namespace ComputerHardwareStoreContracts.BusinessLogicsContracts
{
public interface IProductLogic
{
List<ProductViewModel>? ReadList(ProductSearchModel? model);
ProductViewModel? ReadElement(ProductSearchModel model);
bool Create(ProductBindingModel model);
bool Update(ProductBindingModel model);
bool Delete(ProductBindingModel model);
}
}

View File

@ -0,0 +1,15 @@
using ComputerHardwareStoreContracts.BindingModels;
using ComputerHardwareStoreContracts.SearchModels;
using ComputerHardwareStoreContracts.ViewModels;
namespace ComputerHardwareStoreContracts.BusinessLogicsContracts
{
public interface IStoreKeeperLogic
{
List<StoreKeeperViewModel>? ReadList(StoreKeeperSearchModel? model);
StoreKeeperViewModel? ReadElement(StoreKeeperSearchModel model);
bool Create(StoreKeeperBindingModel model);
bool Update(StoreKeeperBindingModel model);
bool Delete(StoreKeeperBindingModel model);
}
}

View File

@ -0,0 +1,15 @@
using HardwareStoreContracts.BindingModels;
using ComputerHardwareStoreContracts.SearchModels;
using ComputerHardwareStoreContracts.ViewModels;
namespace ComputerHardwareStoreContracts.BusinessLogicsContracts
{
public interface IVendorLogic
{
List<VendorViewModel>? ReadList(VendorSearchModel? model);
VendorViewModel? ReadElement(VendorSearchModel model);
bool Create(VendorBindingModel model);
bool Update(VendorBindingModel model);
bool Delete(VendorBindingModel model);
}
}

View File

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Remove="BusinessLogicsContracts\IStoreKeeperLogic.cs" />
</ItemGroup>
<ItemGroup>
<None Include="BusinessLogicsContracts\IStoreKeeperLogic.cs" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,8 @@
namespace ComputerHardwareStoreContracts.SearchModels
{
public class BuildSearchModel
{
public int? Id { get; set; }
public string? BuildName { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace ComputerHardwareStoreContracts.SearchModels
{
public class CommentSearchModel
{
public int? Id { get; set; }
public DateTime? Date { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace ComputerHardwareStoreContracts.SearchModels
{
public class ComponentSearchModel
{
public int? Id { get; set; }
public string? ComponentName { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace ComputerHardwareStoreContracts.SearchModels
{
public class OrderSearchModel
{
public int? Id { get; set; }
public DateTime? DateFrom { get; set; }
public DateTime? DateTo { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace ComputerHardwareStoreContracts.SearchModels
{
public class ProductSearchModel
{
public int? Id { get; set; }
public string? ProductName { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace ComputerHardwareStoreContracts.SearchModels
{
public class PurchaseSearchModel
{
public int? Id { get; set; }
public DateTime? DateFrom { get; set; }
public DateTime? DateTo { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace ComputerHardwareStoreContracts.SearchModels
{
public class StoreKeeperSearchModel
{
public int? Id { get; set; }
public string? Email { get; set; }
public string? Password { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace ComputerHardwareStoreContracts.SearchModels
{
public class VendorSearchModel
{
public int? Id { get; set; }
public string? Email { get; set; }
public string? Password { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreContracts.BindingModels;
using ComputerHardwareStoreContracts.SearchModels;
using ComputerHardwareStoreContracts.ViewModels;
namespace ComputerHardwareStoreContracts.StorageContracts
{
public interface IBuidStorage
{
List<BuildViewModel> GetFullList();
List<BuildViewModel> GetFilteredList(BuildSearchModel model);
BuildViewModel? GetElement(BuildSearchModel model);
BuildViewModel? Insert(BuildBindingModel model);
BuildViewModel? Update(BuildBindingModel model);
BuildViewModel? Delete(BuildBindingModel model);
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreContracts.BindingModels;
using ComputerHardwareStoreContracts.SearchModels;
using ComputerHardwareStoreContracts.ViewModels;
namespace ComputerHardwareStoreContracts.StorageContracts
{
public interface ICommentStorage
{
List<CommentViewModel> GetFullList();
List<CommentViewModel> GetFilteredList(CommentSearchModel model);
CommentViewModel? GetElement(CommentSearchModel model);
CommentViewModel? Insert(CommentBindingModel model);
CommentViewModel? Update(CommentBindingModel model);
CommentViewModel? Delete(CommentBindingModel model);
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreContracts.BindingModels;
using ComputerHardwareStoreContracts.SearchModels;
using ComputerHardwareStoreContracts.ViewModels;
namespace ComputerHardwareStoreContracts.StorageContracts
{
public interface IComponentStorage
{
List<ComponentViewModel> GetFullList();
List<ComponentViewModel> GetFilteredList(ComponentSearchModel model);
ComponentViewModel? GetElement(ComponentSearchModel model);
ComponentViewModel? Insert(ComponentBindingModel model);
ComponentViewModel? Update(ComponentBindingModel model);
ComponentViewModel? Delete(ComponentBindingModel model);
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreContracts.BindingModels;
using ComputerHardwareStoreContracts.SearchModels;
using ComputerHardwareStoreContracts.ViewModels;
namespace ComputerHardwareStoreContracts.StorageContracts
{
public interface IOrderStorage
{
List<OrderViewModel> GetFullList();
List<OrderViewModel> GetFilteredList(OrderSearchModel model);
OrderViewModel? GetElement(OrderSearchModel model);
OrderViewModel? Insert(OrderBindingModel model);
OrderViewModel? Update(OrderBindingModel model);
OrderViewModel? Delete(OrderBindingModel model);
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreContracts.BindingModels;
using ComputerHardwareStoreContracts.SearchModels;
using ComputerHardwareStoreContracts.ViewModels;
namespace ComputerHardwareStoreContracts.StorageContracts
{
public interface IProductStorage
{
List<ProductViewModel> GetFullList();
List<ProductViewModel> GetFilteredList(ProductSearchModel model);
ProductViewModel? GetElement(ProductSearchModel model);
ProductViewModel? Insert(ProductBindingModel model);
ProductViewModel? Update(ProductBindingModel model);
ProductViewModel? Delete(ProductBindingModel model);
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreContracts.BindingModels;
using ComputerHardwareStoreContracts.SearchModels;
using ComputerHardwareStoreContracts.ViewModels;
namespace ComputerHardwareStoreContracts.StorageContracts
{
public interface IPurchaseStorage
{
List<PurchaseViewModel> GetFullList();
List<PurchaseViewModel> GetFilteredList(PurchaseSearchModel model);
PurchaseViewModel? GetElement(PurchaseSearchModel model);
PurchaseViewModel? Insert(PurchaseBindingModel model);
PurchaseViewModel? Update(PurchaseBindingModel model);
PurchaseViewModel? Delete(PurchaseBindingModel model);
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreContracts.BindingModels;
using ComputerHardwareStoreContracts.SearchModels;
using ComputerHardwareStoreContracts.ViewModels;
namespace ComputerHardwareStoreContracts.StorageContracts
{
public interface IStoreKeeperStorage
{
List<StoreKeeperViewModel> GetFullList();
List<StoreKeeperViewModel> GetFilteredList(StoreKeeperSearchModel model);
StoreKeeperViewModel? GetElement(StoreKeeperSearchModel model);
StoreKeeperViewModel? Insert(StoreKeeperBindingModel model);
StoreKeeperViewModel? Update(StoreKeeperBindingModel model);
StoreKeeperViewModel? Delete(StoreKeeperBindingModel model);
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreContracts.BindingModels;
using ComputerHardwareStoreContracts.SearchModels;
using ComputerHardwareStoreContracts.ViewModels;
namespace ComputerHardwareStoreContracts.StorageContracts
{
public interface IVendorStorage
{
List<VendorViewModel> GetFullList();
List<VendorViewModel> GetFilteredList(VendorSearchModel model);
VendorViewModel? GetElement(VendorSearchModel model);
VendorViewModel? Insert(VendorBindingModel model);
VendorViewModel? Update(VendorBindingModel model);
VendorViewModel? Delete(VendorBindingModel model);
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class BuildModelContracts : IBuildModel
{
public int Id { get; set; }
[DisplayName("Название сборки")]
public string BuildName { get; }
[DisplayName("Стоимость")]
public double Price { get; }
public int VendorId { get; }
public Dictionary<int, (IComponentModel, int)> BuildComponent { get; }
}
}

View File

@ -0,0 +1,12 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class CommentModelContracts : ICommentModel
{
public int Id { get; set; }
public DateTime Date { get; set; }
public string Text { get; set; }
public int BuildId { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class ComponentModelContracts : IComponentModel
{
public int Id { get; set; }
[DisplayName("Название компонента")]
public string ComponentName { get; set; } = string.Empty;
[DisplayName("Цена")]
public double Cost { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class OrderModelContracts : IOrderModel
{
public int Id { get; set; }
[DisplayName("Стоимость")]
public double Cost { get; set; }
[DisplayName("Дата создания")]
DateTime DateCreate { get; set; }
public Dictionary<int, (IProductModel, int)> OrderProduct { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class ProductModelContracts : IProductModel
{
public int Id { get; set; }
[DisplayName("Название изделия")]
public string CannedName { get; set; }
[DisplayName("Цена")]
public double Price { get; set; }
public Dictionary<int, (IComponentModel, int)> CannedComponents { get; set; } = new();
}
}

View File

@ -0,0 +1,20 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class PurchaseModelContracts : IPurchaseModel
{
public int Id { get; set; }
[DisplayName("Стоимость")]
public double Cost { get; set; }
[DisplayName("Дата создания")]
public DateTime DateCreate { get; set; }
public int VendorId { get; set; }
[DisplayName("Сумма")]
public double Sum { get; set; }
public Dictionary<int, (IBuildModel, int)> PurchaseBuild { get; set; }
public Dictionary<int, (IProductModel, int)> PurchaseProduct { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class StoreKeeperModelContracts : IStoreKeeperModel
{
public int Id { get; set; }
[DisplayName("Имя кладовщика")]
public string Name { get; set; }
[DisplayName("Логин")]
public string Login { get; set; }
[DisplayName("Пароль")]
public string Password { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using ComputerHardwareStoreDataModels.Models;
using System.ComponentModel;
namespace ComputerHardwareStoreContracts.ViewModels
{
public class VendorModelContracts : IVendorModel
{
public int Id { get; set; }
[DisplayName("Имя продавца")]
public string Name { get; set; }
[DisplayName("Логин")]
public string Login { get; set; }
[DisplayName("Пароль")]
public string Password { get; set; }
}
}

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,11 @@
namespace ComputerHardwareStoreDataModels.Enums
{
public enum OrderStatus
{
Неизвестен = -1,
Принят = 0,
Выполняется = 1,
Готов = 2,
Выдан = 3,
}
}

View File

@ -0,0 +1,7 @@
namespace ComputerHardwareStoreDataModels
{
public interface IId
{
int Id { get; }
}
}

View File

@ -0,0 +1,10 @@
namespace ComputerHardwareStoreDataModels.Models
{
public interface IBuildModel : IId
{
string BuildName { get; }
double Price { get; }
int VendorId { get; }
public Dictionary<int, (IComponentModel, int)> BuildComponent { get; }
}
}

View File

@ -0,0 +1,9 @@
namespace ComputerHardwareStoreDataModels.Models
{
public interface ICommentModel : IId
{
DateTime Date { get; }
string Text { get; }
int BuildId { get; }
}
}

View File

@ -0,0 +1,9 @@
namespace ComputerHardwareStoreDataModels.Models
{
public interface IComponentModel : IId
{
string ComponentName { get; }
double Cost { get; }
int StoreKeeperId { get; }
}
}

View File

@ -0,0 +1,10 @@
namespace ComputerHardwareStoreDataModels.Models
{
public interface IOrderModel : IId
{
double Cost { get; }
DateTime DateCreate { get; }
int StoreKeeperId { get; }
public Dictionary<int, (IProductModel, int)> OrderProduct { get; }
}
}

View File

@ -0,0 +1,9 @@
namespace ComputerHardwareStoreDataModels.Models
{
public interface IProductModel : IId
{
string Name { get; }
double Price { get; }
public Dictionary<int, (IComponentModel, int)> ProductComponent { get; }
}
}

View File

@ -0,0 +1,12 @@
namespace ComputerHardwareStoreDataModels.Models
{
public interface IPurchaseModel : IId
{
double Cost { get; }
DateTime DateCreate { get; }
int VendorId { get; }
double Sum { get; }
public Dictionary<int, (IBuildModel, int)> PurchaseBuild { get; }
public Dictionary<int, (IProductModel, int)> PurchaseProduct { get; }
}
}

View File

@ -0,0 +1,9 @@
namespace ComputerHardwareStoreDataModels.Models
{
public interface IStoreKeeperModel : IId
{
string Name { get; }
string Login { get; }
string Password { get; }
}
}

View File

@ -0,0 +1,9 @@
namespace ComputerHardwareStoreDataModels.Models
{
public interface IVendorModel : IId
{
string Name { get; }
string Login { get; }
string Password { get; }
}
}