diff --git a/HardwareShop/HardwareShopContracts/ViewModels/BuildViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/BuildViewModel.cs index 5538c89..93e5ca1 100644 --- a/HardwareShop/HardwareShopContracts/ViewModels/BuildViewModel.cs +++ b/HardwareShop/HardwareShopContracts/ViewModels/BuildViewModel.cs @@ -13,8 +13,8 @@ namespace FoodOrdersContracts.ViewModels [DisplayName("Название компонента")] public string BuildName { get; set; } = string.Empty; - [DisplayName("Email клиента")] - public string Email { get; set; } = string.Empty; + [DisplayName("Клиент")] + public string UserEmail { get; set; } = string.Empty; public int UserID { get; set; } } diff --git a/HardwareShop/HardwareShopContracts/ViewModels/CommentViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/CommentViewModel.cs index 6e73a3c..f7c8cce 100644 --- a/HardwareShop/HardwareShopContracts/ViewModels/CommentViewModel.cs +++ b/HardwareShop/HardwareShopContracts/ViewModels/CommentViewModel.cs @@ -6,10 +6,14 @@ namespace FoodOrdersContracts.ViewModels { public class CommentViewModel : ICommentModel { - public string Text => throw new NotImplementedException(); + public int Id { get; set; } - public int BuildID => throw new NotImplementedException(); + [DisplayName("Комментарий")] + public string Text { get; set; } = string.Empty; - public int Id => throw new NotImplementedException(); + [DisplayName("Название сборки")] + public string BuildName { get; set; } = string.Empty; + + public int BuildID { get; set; } } } diff --git a/HardwareShop/HardwareShopContracts/ViewModels/ComponentViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/ComponentViewModel.cs index 22d6e23..b4e7e8f 100644 --- a/HardwareShop/HardwareShopContracts/ViewModels/ComponentViewModel.cs +++ b/HardwareShop/HardwareShopContracts/ViewModels/ComponentViewModel.cs @@ -9,6 +9,6 @@ namespace FoodOrdersContracts.ViewModels { public class ComponentViewModel : IComponentModel { - public int Id => throw new NotImplementedException(); + public int Id { get; set; } } } diff --git a/HardwareShop/HardwareShopContracts/ViewModels/GoodViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/GoodViewModel.cs index 191360e..e396318 100644 --- a/HardwareShop/HardwareShopContracts/ViewModels/GoodViewModel.cs +++ b/HardwareShop/HardwareShopContracts/ViewModels/GoodViewModel.cs @@ -10,6 +10,6 @@ namespace FoodOrdersContracts.ViewModels { public class GoodViewModel : IGoodModel { - public int Id => throw new NotImplementedException(); + public int Id { get; set; } } } diff --git a/HardwareShop/HardwareShopContracts/ViewModels/OrderViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/OrderViewModel.cs index 73ea37f..c6c7758 100644 --- a/HardwareShop/HardwareShopContracts/ViewModels/OrderViewModel.cs +++ b/HardwareShop/HardwareShopContracts/ViewModels/OrderViewModel.cs @@ -6,6 +6,6 @@ namespace FoodOrdersContracts.ViewModels { public class OrderViewModel : IOrderModel { - public int Id => throw new NotImplementedException(); + public int Id { get; set; } } } diff --git a/HardwareShop/HardwareShopContracts/ViewModels/PurchaseViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/PurchaseViewModel.cs index 094d2b1..565d063 100644 --- a/HardwareShop/HardwareShopContracts/ViewModels/PurchaseViewModel.cs +++ b/HardwareShop/HardwareShopContracts/ViewModels/PurchaseViewModel.cs @@ -6,18 +6,24 @@ namespace FoodOrdersContracts.ViewModels { public class PurachaseViewModel : IPurchaseModel { - public int Id => throw new NotImplementedException(); + public int Id { get; set; } - public decimal Sum => throw new NotImplementedException(); + [DisplayName("Цена")] + public decimal Sum { get; set; } - public PurchaseStatus Status => throw new NotImplementedException(); + [DisplayName("Статус покупки")] + public PurchaseStatus PurchaseStatus { get; set; } = PurchaseStatus.Неизвестен; - public DateTime? DatePurchase => throw new NotImplementedException(); + [DisplayName("Дата оплаты")] + public DateTime? DatePurchase { get; set; } - public int UserID => throw new NotImplementedException(); + public int UserID { get; set; } - public Dictionary? PurchaseBuilds => throw new NotImplementedException(); + [DisplayName("Email клиента")] + public string UserEmail { get; set; } = string.Empty; - public Dictionary PurchaseGoods => throw new NotImplementedException(); + public Dictionary? PurchaseBuilds { get; set; } + + public Dictionary PurchaseGoods { get; set; } } } diff --git a/HardwareShop/HardwareShopDataModels/Models/IPurchaseModel.cs b/HardwareShop/HardwareShopDataModels/Models/IPurchaseModel.cs index 42e81ae..32b0af5 100644 --- a/HardwareShop/HardwareShopDataModels/Models/IPurchaseModel.cs +++ b/HardwareShop/HardwareShopDataModels/Models/IPurchaseModel.cs @@ -6,7 +6,7 @@ namespace HardwareShopDataModels.Models { decimal Sum { get; } - PurchaseStatus Status { get; } + PurchaseStatus PurchaseStatus { get; } //через "?" обозначается что поле может быть null DateTime? DatePurchase { get; }