diff --git a/HardwareShop/HardwareShopContracts/HardwareShopContracts.csproj b/HardwareShop/HardwareShopContracts/HardwareShopContracts.csproj
index 132c02c..615c25a 100644
--- a/HardwareShop/HardwareShopContracts/HardwareShopContracts.csproj
+++ b/HardwareShop/HardwareShopContracts/HardwareShopContracts.csproj
@@ -6,4 +6,8 @@
enable
+
+
+
+
diff --git a/HardwareShop/HardwareShopContracts/ViewModels/BuildViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/BuildViewModel.cs
new file mode 100644
index 0000000..5538c89
--- /dev/null
+++ b/HardwareShop/HardwareShopContracts/ViewModels/BuildViewModel.cs
@@ -0,0 +1,21 @@
+using FoodOrdersDataModels.Models;
+using HardwareShopDataModels.Models;
+using System.ComponentModel;
+namespace FoodOrdersContracts.ViewModels
+{
+ public class BuildViewModel : IBuildModel
+ {
+ public int Id { get; set; }
+
+ [DisplayName("Цена")]
+ public decimal Price { get; set; }
+
+ [DisplayName("Название компонента")]
+ public string BuildName { get; set; } = string.Empty;
+
+ [DisplayName("Email клиента")]
+ public string Email { get; set; } = string.Empty;
+
+ public int UserID { get; set; }
+ }
+}
diff --git a/HardwareShop/HardwareShopContracts/ViewModels/ClientViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/ClientViewModel.cs
new file mode 100644
index 0000000..cfc58f7
--- /dev/null
+++ b/HardwareShop/HardwareShopContracts/ViewModels/ClientViewModel.cs
@@ -0,0 +1,23 @@
+using FoodOrdersDataModels.Models;
+using HardwareShopDataModels.Enums;
+using System.ComponentModel;
+
+namespace FoodOrdersContracts.ViewModels
+{
+ public class ClientViewModel : IClientModel
+ {
+ public int Id { get; set; }
+
+ [DisplayName("Логин клиента")]
+ public string Login { get; set; } = string.Empty;
+
+ [DisplayName("Email клиента")]
+ public string Email { get; set; } = string.Empty;
+
+ [DisplayName("Пароль")]
+ public string Password { get; set; } = string.Empty;
+
+ [DisplayName("Роль")]
+ public UserRole Role { get; set; } = UserRole.Неизвестен;
+ }
+}
\ No newline at end of file
diff --git a/HardwareShop/HardwareShopContracts/ViewModels/CommentViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/CommentViewModel.cs
new file mode 100644
index 0000000..6e73a3c
--- /dev/null
+++ b/HardwareShop/HardwareShopContracts/ViewModels/CommentViewModel.cs
@@ -0,0 +1,15 @@
+using FoodOrdersDataModels.Models;
+using HardwareShopDataModels.Models;
+using System.ComponentModel;
+
+namespace FoodOrdersContracts.ViewModels
+{
+ public class CommentViewModel : ICommentModel
+ {
+ public string Text => throw new NotImplementedException();
+
+ public int BuildID => throw new NotImplementedException();
+
+ public int Id => throw new NotImplementedException();
+ }
+}
diff --git a/HardwareShop/HardwareShopContracts/ViewModels/ComponentViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/ComponentViewModel.cs
new file mode 100644
index 0000000..22d6e23
--- /dev/null
+++ b/HardwareShop/HardwareShopContracts/ViewModels/ComponentViewModel.cs
@@ -0,0 +1,14 @@
+using HardwareShopDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FoodOrdersContracts.ViewModels
+{
+ public class ComponentViewModel : IComponentModel
+ {
+ public int Id => throw new NotImplementedException();
+ }
+}
diff --git a/HardwareShop/HardwareShopContracts/ViewModels/GoodViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/GoodViewModel.cs
new file mode 100644
index 0000000..191360e
--- /dev/null
+++ b/HardwareShop/HardwareShopContracts/ViewModels/GoodViewModel.cs
@@ -0,0 +1,15 @@
+using FoodOrdersDataModels.Enums;
+using HardwareShopDataModels.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FoodOrdersContracts.ViewModels
+{
+ public class GoodViewModel : IGoodModel
+ {
+ public int Id => throw new NotImplementedException();
+ }
+}
diff --git a/HardwareShop/HardwareShopContracts/ViewModels/OrderViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/OrderViewModel.cs
new file mode 100644
index 0000000..73ea37f
--- /dev/null
+++ b/HardwareShop/HardwareShopContracts/ViewModels/OrderViewModel.cs
@@ -0,0 +1,11 @@
+using FoodOrdersDataModels.Enums;
+using FoodOrdersDataModels.Models;
+using HardwareShopDataModels.Models;
+using System.ComponentModel;
+namespace FoodOrdersContracts.ViewModels
+{
+ public class OrderViewModel : IOrderModel
+ {
+ public int Id => throw new NotImplementedException();
+ }
+}
diff --git a/HardwareShop/HardwareShopContracts/ViewModels/PurchaseViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/PurchaseViewModel.cs
new file mode 100644
index 0000000..094d2b1
--- /dev/null
+++ b/HardwareShop/HardwareShopContracts/ViewModels/PurchaseViewModel.cs
@@ -0,0 +1,23 @@
+using FoodOrdersDataModels.Enums;
+using FoodOrdersDataModels.Models;
+using HardwareShopDataModels.Models;
+using System.ComponentModel;
+namespace FoodOrdersContracts.ViewModels
+{
+ public class PurachaseViewModel : IPurchaseModel
+ {
+ public int Id => throw new NotImplementedException();
+
+ public decimal Sum => throw new NotImplementedException();
+
+ public PurchaseStatus Status => throw new NotImplementedException();
+
+ public DateTime? DatePurchase => throw new NotImplementedException();
+
+ public int UserID => throw new NotImplementedException();
+
+ public Dictionary? PurchaseBuilds => throw new NotImplementedException();
+
+ public Dictionary PurchaseGoods => throw new NotImplementedException();
+ }
+}
diff --git a/HardwareShop/HardwareShopDataModels/Enums/UserRole.cs b/HardwareShop/HardwareShopDataModels/Enums/UserRole.cs
index 63c95be..13807b1 100644
--- a/HardwareShop/HardwareShopDataModels/Enums/UserRole.cs
+++ b/HardwareShop/HardwareShopDataModels/Enums/UserRole.cs
@@ -8,6 +8,7 @@ namespace HardwareShopDataModels.Enums
{
public enum UserRole
{
+ Неизвестен = 0,
Работник = 1,
Кладовщик = 2,
}
diff --git a/HardwareShop/HardwareShopDataModels/Models/IBuildModel.cs b/HardwareShop/HardwareShopDataModels/Models/IBuildModel.cs
index 1726cae..d20ee56 100644
--- a/HardwareShop/HardwareShopDataModels/Models/IBuildModel.cs
+++ b/HardwareShop/HardwareShopDataModels/Models/IBuildModel.cs
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace HardwareShopDataModels.Models
{
- public interface IBuildModel
+ public interface IBuildModel : IId
{
decimal Price { get; }
diff --git a/HardwareShop/HardwareShopDataModels/Models/ICommentModel.cs b/HardwareShop/HardwareShopDataModels/Models/ICommentModel.cs
index b663af7..9f57aab 100644
--- a/HardwareShop/HardwareShopDataModels/Models/ICommentModel.cs
+++ b/HardwareShop/HardwareShopDataModels/Models/ICommentModel.cs
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace HardwareShopDataModels.Models
{
- public interface ICommentModel
+ public interface ICommentModel : IId
{
string Text { get; }
diff --git a/HardwareShop/HardwareShopDataModels/Models/IComponentModel.cs b/HardwareShop/HardwareShopDataModels/Models/IComponentModel.cs
index d498566..c5a820a 100644
--- a/HardwareShop/HardwareShopDataModels/Models/IComponentModel.cs
+++ b/HardwareShop/HardwareShopDataModels/Models/IComponentModel.cs
@@ -1,6 +1,6 @@
namespace HardwareShopDataModels.Models
{
- public interface IComponentModel
+ public interface IComponentModel : IId
{
}
}
diff --git a/HardwareShop/HardwareShopDataModels/Models/IGoodModel.cs b/HardwareShop/HardwareShopDataModels/Models/IGoodModel.cs
index 9fb6b6c..fd830b4 100644
--- a/HardwareShop/HardwareShopDataModels/Models/IGoodModel.cs
+++ b/HardwareShop/HardwareShopDataModels/Models/IGoodModel.cs
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace HardwareShopDataModels.Models
{
- public interface IGoodModel
+ public interface IGoodModel : IId
{
}
}