diff --git a/Canteen/CanteenContracts/BindingModels/CookBindingModel.cs b/Canteen/CanteenContracts/BindingModels/CookBindingModel.cs index db0a85d..9c9698c 100644 --- a/Canteen/CanteenContracts/BindingModels/CookBindingModel.cs +++ b/Canteen/CanteenContracts/BindingModels/CookBindingModel.cs @@ -11,12 +11,8 @@ namespace CanteenContracts.BindingModels { public int Id { get; set; } public int ManagerId { get; set; } - public string Name { get; set; } = string.Empty; - - public string Surname { get; set; } = string.Empty; - - public string Patronymic { get; set; } = string.Empty; - + public string FIO { get; set; } = string.Empty; public string Position { get; set; } = string.Empty; } + } diff --git a/Canteen/CanteenContracts/BindingModels/DishBindingModel.cs b/Canteen/CanteenContracts/BindingModels/DishBindingModel.cs index 9e5e9bb..6c910fc 100644 --- a/Canteen/CanteenContracts/BindingModels/DishBindingModel.cs +++ b/Canteen/CanteenContracts/BindingModels/DishBindingModel.cs @@ -11,8 +11,9 @@ namespace CanteenContracts.BindingModels { public int Id { get; set; } public string DishName { get; set; } = string.Empty; - public double Cost { get; set; } + public double Price { get; set; } public int ManagerId { get; set; } public Dictionary DishProducts { get; set; } = new(); } + } diff --git a/Canteen/CanteenContracts/BindingModels/DishLinkBindingModel.cs b/Canteen/CanteenContracts/BindingModels/DishLinkBindingModel.cs deleted file mode 100644 index 9a60bf5..0000000 --- a/Canteen/CanteenContracts/BindingModels/DishLinkBindingModel.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CanteenContracts.BindingModels -{ - public class DishLinkBindingModel - { - public int Id { get; set; } - } -} diff --git a/Canteen/CanteenContracts/BindingModels/LunchBindingModel.cs b/Canteen/CanteenContracts/BindingModels/LunchBindingModel.cs index 4931f79..b179209 100644 --- a/Canteen/CanteenContracts/BindingModels/LunchBindingModel.cs +++ b/Canteen/CanteenContracts/BindingModels/LunchBindingModel.cs @@ -13,9 +13,11 @@ namespace CanteenContracts.BindingModels public int Id { get; set; } public int VisitorId { get; set; } public string LunchName { get; set; } = string.Empty; - public double Cost { get; set; } - public Dictionary LunchProducts { get; set; } = new(); - - + public double Sum { get; set; } + public LunchStatus Status { get; set; } + public DateTime DateCreate { get; set; } = DateTime.Now; + public DateTime? DateImplement { get; set; } + public Dictionary LunchProducts { get; set; } = new Dictionary(); } + } diff --git a/Canteen/CanteenContracts/BindingModels/LunchLinkBindingModel.cs b/Canteen/CanteenContracts/BindingModels/LunchLinkBindingModel.cs deleted file mode 100644 index cac8c5b..0000000 --- a/Canteen/CanteenContracts/BindingModels/LunchLinkBindingModel.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CanteenContracts.BindingModels -{ - public class LunchLinkBindingModel - { - public int Id { get; set; } - } -} diff --git a/Canteen/CanteenContracts/BindingModels/ManagerBindingModel.cs b/Canteen/CanteenContracts/BindingModels/ManagerBindingModel.cs index 246f6ac..987e793 100644 --- a/Canteen/CanteenContracts/BindingModels/ManagerBindingModel.cs +++ b/Canteen/CanteenContracts/BindingModels/ManagerBindingModel.cs @@ -18,7 +18,5 @@ namespace CanteenContracts.BindingModels public string PhoneNumber { get; set; } = string.Empty; - public int RoleId { get; set; } - } } diff --git a/Canteen/CanteenContracts/BindingModels/OrderBindingModel.cs b/Canteen/CanteenContracts/BindingModels/OrderBindingModel.cs index 1218707..4d660ce 100644 --- a/Canteen/CanteenContracts/BindingModels/OrderBindingModel.cs +++ b/Canteen/CanteenContracts/BindingModels/OrderBindingModel.cs @@ -13,7 +13,8 @@ namespace CanteenContracts.BindingModels public int Id { get; set; } public int VisitorId { get; set; } public string Description { get; set; } = string.Empty; - public double Sum { get; set; } - public DateTime DateCreate { get; } = DateTime.Now; + public double? Sum { get; set; } + public Dictionary OrderDishes { get; set; } = new (); } + } diff --git a/Canteen/CanteenContracts/BindingModels/ProductBindingModel.cs b/Canteen/CanteenContracts/BindingModels/ProductBindingModel.cs index e29b15a..15d507c 100644 --- a/Canteen/CanteenContracts/BindingModels/ProductBindingModel.cs +++ b/Canteen/CanteenContracts/BindingModels/ProductBindingModel.cs @@ -11,12 +11,8 @@ namespace CanteenContracts.BindingModels { public int Id { get; set; } public string ProductName { get; set; } = string.Empty; - - public double Cost { get; set; } - + public double Price { get; set; } public int ManagerId { get; set; } - - public Dictionary ProductCooks{ get; set; } = new(); - + public Dictionary ProductCooks { get; set; } = new Dictionary(); } } diff --git a/Canteen/CanteenContracts/BindingModels/RoleBindingModel.cs b/Canteen/CanteenContracts/BindingModels/RoleBindingModel.cs deleted file mode 100644 index c79dc0e..0000000 --- a/Canteen/CanteenContracts/BindingModels/RoleBindingModel.cs +++ /dev/null @@ -1,16 +0,0 @@ -using CanteenDataModels.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CanteenContracts.BindingModels -{ - public class RoleBindingModel : IRoleModel - { - public int Id { get; set; } - public string RoleName { get; set; } = string.Empty; - - } -} diff --git a/Canteen/CanteenContracts/BindingModels/TablewareBindingModel.cs b/Canteen/CanteenContracts/BindingModels/TablewareBindingModel.cs index c81aef4..33538d8 100644 --- a/Canteen/CanteenContracts/BindingModels/TablewareBindingModel.cs +++ b/Canteen/CanteenContracts/BindingModels/TablewareBindingModel.cs @@ -10,10 +10,9 @@ namespace CanteenContracts.BindingModels public class TablewareBindingModel : ITablewareModel { public int Id { get; set; } + public int VisitorId { get; set; } + public int OrderId { get; set; } public string TablewareName { get; set; } = string.Empty; public int Count { get; set; } - public int ManagerId { get; set; } - public int OrderId { get; set; } - } } diff --git a/Canteen/CanteenContracts/BindingModels/VisitorBindingModel.cs b/Canteen/CanteenContracts/BindingModels/VisitorBindingModel.cs index 735b1cf..f6d5d27 100644 --- a/Canteen/CanteenContracts/BindingModels/VisitorBindingModel.cs +++ b/Canteen/CanteenContracts/BindingModels/VisitorBindingModel.cs @@ -17,7 +17,5 @@ namespace CanteenContracts.BindingModels public string Password { get; set; } = string.Empty; public string PhoneNumber { get; set; } = string.Empty; - - public int RoleId { get; set; } } } diff --git a/Canteen/CanteenContracts/BusinessLogicsContracts/ILunchLogic.cs b/Canteen/CanteenContracts/BusinessLogicsContracts/ILunchLogic.cs index 737751f..0b1f5c3 100644 --- a/Canteen/CanteenContracts/BusinessLogicsContracts/ILunchLogic.cs +++ b/Canteen/CanteenContracts/BusinessLogicsContracts/ILunchLogic.cs @@ -15,6 +15,7 @@ namespace CanteenContracts.BusinessLogicsContracts LunchViewModel? ReadElement(LunchSearchModel model); bool Create(LunchBindingModel model); bool Update(LunchBindingModel model); - bool Delete(LunchBindingModel model); + bool Finish(LunchBindingModel model); + bool AddOrder(OrderBindingModel model); } } diff --git a/Canteen/CanteenContracts/BusinessLogicsContracts/IOrderLogic.cs b/Canteen/CanteenContracts/BusinessLogicsContracts/IOrderLogic.cs index eb7fdd9..2250197 100644 --- a/Canteen/CanteenContracts/BusinessLogicsContracts/IOrderLogic.cs +++ b/Canteen/CanteenContracts/BusinessLogicsContracts/IOrderLogic.cs @@ -13,9 +13,9 @@ namespace CanteenContracts.BusinessLogicsContracts { List? ReadList(OrderSearchModel? model); OrderViewModel? ReadElement(OrderSearchModel model); - bool CreateOrder(OrderBindingModel model); - bool AddLunch(LunchLinkBindingModel model); - bool AddDish(DishLinkBindingModel model); - bool AddCook(CookLinkBindingModel model); + bool Create(OrderBindingModel model); + bool Delete(OrderBindingModel model); + bool Update(OrderBindingModel model); + bool AddCook(CookBindingModel model); } } diff --git a/Canteen/CanteenContracts/BusinessLogicsContracts/IRoleLogic.cs b/Canteen/CanteenContracts/BusinessLogicsContracts/IRoleLogic.cs deleted file mode 100644 index 91ca137..0000000 --- a/Canteen/CanteenContracts/BusinessLogicsContracts/IRoleLogic.cs +++ /dev/null @@ -1,20 +0,0 @@ -using CanteenContracts.BindingModels; -using CanteenContracts.SearchModel; -using CanteenContracts.View; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CanteenContracts.BusinessLogicsContracts -{ - public interface IRoleLogic - { - List? ReadList(RoleSearchModel? model); - RoleViewModel? ReadElement(RoleSearchModel model); - bool Create(RoleBindingModel model); - bool Update(RoleBindingModel model); - bool Delete(RoleBindingModel model); - } -} diff --git a/Canteen/CanteenContracts/CanteenContracts.csproj b/Canteen/CanteenContracts/CanteenContracts.csproj index cad237d..c05a6d0 100644 --- a/Canteen/CanteenContracts/CanteenContracts.csproj +++ b/Canteen/CanteenContracts/CanteenContracts.csproj @@ -12,7 +12,6 @@ - diff --git a/Canteen/CanteenContracts/SearchModels/CookSearchModel.cs b/Canteen/CanteenContracts/SearchModels/CookSearchModel.cs index 4ee4e5c..7bd301f 100644 --- a/Canteen/CanteenContracts/SearchModels/CookSearchModel.cs +++ b/Canteen/CanteenContracts/SearchModels/CookSearchModel.cs @@ -10,8 +10,5 @@ namespace CanteenContracts.SearchModel { public int? Id { get; set; } public int? ManagerId { get; set; } - public string? Name { get; set; } - public string? Surname { get; set; } - public string? Patronymic { get; set; } } } diff --git a/Canteen/CanteenContracts/SearchModels/DishSearchModel.cs b/Canteen/CanteenContracts/SearchModels/DishSearchModel.cs index 98911bb..e886f79 100644 --- a/Canteen/CanteenContracts/SearchModels/DishSearchModel.cs +++ b/Canteen/CanteenContracts/SearchModels/DishSearchModel.cs @@ -10,6 +10,5 @@ namespace CanteenContracts.SearchModel { public int? Id { get; set; } public int? ManagerId { get; set; } - public string? DishName { get; set; } } } diff --git a/Canteen/CanteenContracts/SearchModels/LunchSearchModel.cs b/Canteen/CanteenContracts/SearchModels/LunchSearchModel.cs index 79c7d30..ca9eb9c 100644 --- a/Canteen/CanteenContracts/SearchModels/LunchSearchModel.cs +++ b/Canteen/CanteenContracts/SearchModels/LunchSearchModel.cs @@ -10,6 +10,7 @@ namespace CanteenContracts.SearchModel { public int? Id { get; set; } public int? VisitorId { get; set; } - public string? LunchName { get; set; } + public DateTime? DateFrom { get; set; } + public DateTime? DateTo { get; set; } } } diff --git a/Canteen/CanteenContracts/SearchModels/ManagerSearchModel.cs b/Canteen/CanteenContracts/SearchModels/ManagerSearchModel.cs index ac2b603..238a5ab 100644 --- a/Canteen/CanteenContracts/SearchModels/ManagerSearchModel.cs +++ b/Canteen/CanteenContracts/SearchModels/ManagerSearchModel.cs @@ -9,9 +9,8 @@ namespace CanteenContracts.SearchModel public class ManagerSearchModel { public int? Id { get; set; } - public string? ClientFIO { get; set; } - public string? PhoneNumber { get; set; } public string? Login { get; set; } public string? Password { get; set; } + public string? PhoneNumber { get; set; } } } diff --git a/Canteen/CanteenContracts/SearchModels/OrderSearchModel.cs b/Canteen/CanteenContracts/SearchModels/OrderSearchModel.cs index 2822fb3..720435e 100644 --- a/Canteen/CanteenContracts/SearchModels/OrderSearchModel.cs +++ b/Canteen/CanteenContracts/SearchModels/OrderSearchModel.cs @@ -10,7 +10,5 @@ namespace CanteenContracts.SearchModel { public int? Id { get; set; } public int? VisitorId { get; set; } - public DateTime? DateFrom { get; set; } - public DateTime? DateTo { get; set; } } } diff --git a/Canteen/CanteenContracts/SearchModels/ProductSearchModel.cs b/Canteen/CanteenContracts/SearchModels/ProductSearchModel.cs index 79675c1..172f78f 100644 --- a/Canteen/CanteenContracts/SearchModels/ProductSearchModel.cs +++ b/Canteen/CanteenContracts/SearchModels/ProductSearchModel.cs @@ -10,6 +10,5 @@ namespace CanteenContracts.SearchModel { public int? Id { get; set; } public int? ManagerId { get; set; } - public string? ProductName { get; set; } } } diff --git a/Canteen/CanteenContracts/SearchModels/RoleSearchModel.cs b/Canteen/CanteenContracts/SearchModels/RoleSearchModel.cs deleted file mode 100644 index e3a5a00..0000000 --- a/Canteen/CanteenContracts/SearchModels/RoleSearchModel.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CanteenContracts.SearchModel -{ - public class RoleSearchModel - { - public int? Id { get; set; } - public string? RoleName { get; set; } - - } -} diff --git a/Canteen/CanteenContracts/SearchModels/TablewareSearchModel.cs b/Canteen/CanteenContracts/SearchModels/TablewareSearchModel.cs index cff2fcc..51ba272 100644 --- a/Canteen/CanteenContracts/SearchModels/TablewareSearchModel.cs +++ b/Canteen/CanteenContracts/SearchModels/TablewareSearchModel.cs @@ -10,6 +10,5 @@ namespace CanteenContracts.SearchModel { public int? Id { get; set; } public int? VisitorId { get; set; } - public string? TablewareName { get; set; } } } diff --git a/Canteen/CanteenContracts/SearchModels/VisitorSearchModel.cs b/Canteen/CanteenContracts/SearchModels/VisitorSearchModel.cs index a79b25c..53a6702 100644 --- a/Canteen/CanteenContracts/SearchModels/VisitorSearchModel.cs +++ b/Canteen/CanteenContracts/SearchModels/VisitorSearchModel.cs @@ -9,9 +9,8 @@ namespace CanteenContracts.SearchModel public class VisitorSearchModel { public int? Id { get; set; } - public string? ClientFIO { get; set; } - public string? PhoneNumber { get; set; } public string? Login { get; set; } public string? Password { get; set; } + public string? PhoneNumber { get; set; } } } diff --git a/Canteen/CanteenContracts/StoragesContracts/ILunchStorage.cs b/Canteen/CanteenContracts/StoragesContracts/ILunchStorage.cs index d57b269..22aca45 100644 --- a/Canteen/CanteenContracts/StoragesContracts/ILunchStorage.cs +++ b/Canteen/CanteenContracts/StoragesContracts/ILunchStorage.cs @@ -17,5 +17,6 @@ namespace CanteenContracts.StoragesContracts LunchViewModel? Insert(LunchBindingModel model); LunchViewModel? Update(LunchBindingModel model); LunchViewModel? Delete(LunchBindingModel model); + OrderViewModel? AddOrder(OrderBindingModel model); } } diff --git a/Canteen/CanteenContracts/StoragesContracts/IOrderStorage.cs b/Canteen/CanteenContracts/StoragesContracts/IOrderStorage.cs index 3ac7c65..dc70139 100644 --- a/Canteen/CanteenContracts/StoragesContracts/IOrderStorage.cs +++ b/Canteen/CanteenContracts/StoragesContracts/IOrderStorage.cs @@ -17,8 +17,6 @@ namespace CanteenContracts.StoragesContracts OrderViewModel? Insert(OrderBindingModel model); OrderViewModel? Update(OrderBindingModel model); OrderViewModel? Delete(OrderBindingModel model); - OrderViewModel? AddLunch(LunchLinkBindingModel model); - OrderViewModel? AddDish(DishLinkBindingModel model); - OrderViewModel? AddCook(CookLinkBindingModel model); + OrderViewModel? AddCook(CookBindingModel model); } } diff --git a/Canteen/CanteenContracts/StoragesContracts/IRoleStorage.cs b/Canteen/CanteenContracts/StoragesContracts/IRoleStorage.cs deleted file mode 100644 index 6c0ccf6..0000000 --- a/Canteen/CanteenContracts/StoragesContracts/IRoleStorage.cs +++ /dev/null @@ -1,21 +0,0 @@ -using CanteenContracts.BindingModels; -using CanteenContracts.SearchModel; -using CanteenContracts.View; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CanteenContracts.StoragesContracts -{ - public interface IRoleStorage - { - List GetFullList(); - List GetFilteredList(RoleSearchModel model); - RoleViewModel? GetElement(RoleSearchModel model); - RoleViewModel? Insert(RoleBindingModel model); - RoleViewModel? Update(RoleBindingModel model); - RoleViewModel? Delete(RoleBindingModel model); - } -} diff --git a/Canteen/CanteenContracts/ViewModels/CookViewModel.cs b/Canteen/CanteenContracts/ViewModels/CookViewModel.cs index 00c41bb..96c3018 100644 --- a/Canteen/CanteenContracts/ViewModels/CookViewModel.cs +++ b/Canteen/CanteenContracts/ViewModels/CookViewModel.cs @@ -10,17 +10,12 @@ namespace CanteenContracts.View { public class CookViewModel : ICookModel { - [DisplayName("Имя")] - public string Name { get; set; } = string.Empty; - [DisplayName("Фамилия")] - public string Surname { get; set; } = string.Empty; - [DisplayName("Отчество")] - public string? Patronymic { get; set; } = string.Empty; + [DisplayName("ФИО")] + public string FIO { get; set; } = string.Empty; [DisplayName("Должность")] public string Position { get; set; } = string.Empty; - + [DisplayName("ID менеджера")] public int ManagerId { get; set; } - public int Id { get; set; } } } diff --git a/Canteen/CanteenContracts/ViewModels/DishViewModel.cs b/Canteen/CanteenContracts/ViewModels/DishViewModel.cs index f89c4ba..8ea7f6d 100644 --- a/Canteen/CanteenContracts/ViewModels/DishViewModel.cs +++ b/Canteen/CanteenContracts/ViewModels/DishViewModel.cs @@ -10,12 +10,13 @@ namespace CanteenContracts.View { public class DishViewModel : IDishModel { - public int Id { get; set; } - public int ManagerId { get; set; } [DisplayName("Название блюда")] - public string DishName { get; set; } = string.Empty; + public string DishName { get; set; } [DisplayName("Цена")] - public double Cost { get; set; } - public Dictionary DishProducts { get; set; } = new(); + public double Price { get; set; } + [DisplayName("ID менеджера")] + public int ManagerId { get; set; } + public int Id { get; set; } + public Dictionary DishProducts { get; set; } } } diff --git a/Canteen/CanteenContracts/ViewModels/LunchViewModel.cs b/Canteen/CanteenContracts/ViewModels/LunchViewModel.cs index 0ba81e0..0c1fb26 100644 --- a/Canteen/CanteenContracts/ViewModels/LunchViewModel.cs +++ b/Canteen/CanteenContracts/ViewModels/LunchViewModel.cs @@ -1,4 +1,5 @@ -using CanteenDataModels.Models; +using CanteenDataModels.Enums; +using CanteenDataModels.Models; using System; using System.Collections.Generic; using System.ComponentModel; @@ -11,11 +12,18 @@ namespace CanteenContracts.View public class LunchViewModel : ILunchModel { public int Id { get; set; } + [DisplayName("ID посетителя")] public int VisitorId { get; set; } [DisplayName("Название обеда")] public string LunchName { get; set; } = string.Empty; - [DisplayName("Цена")] - public double Cost { get; set; } + [DisplayName("Сумма")] + public double Sum { get; set; } + [DisplayName("Статус")] + public LunchStatus Status { get; set; } + [DisplayName("Дата создания")] + public DateTime DateCreate { get; set; } + [DisplayName("Дата реализации")] + public DateTime? DateImplement { get; set; } public Dictionary LunchProducts { get; set; } = new(); } } diff --git a/Canteen/CanteenContracts/ViewModels/ManagerViewModel.cs b/Canteen/CanteenContracts/ViewModels/ManagerViewModel.cs index 3cc0559..fceacd7 100644 --- a/Canteen/CanteenContracts/ViewModels/ManagerViewModel.cs +++ b/Canteen/CanteenContracts/ViewModels/ManagerViewModel.cs @@ -10,7 +10,7 @@ namespace CanteenContracts.View { public class ManagerViewModel : IManagerModel { - [DisplayName("ФИО управляющего")] + [DisplayName("ФИО")] public string FIO { get; set; } = string.Empty; [DisplayName("Логин")] public string Login { get; set; } = string.Empty; @@ -18,9 +18,7 @@ namespace CanteenContracts.View public string Password { get; set; } = string.Empty; [DisplayName("Номер телефона")] public string PhoneNumber { get; set; } = string.Empty; - - public int RoleId { get; set; } - public int Id { get; set; } } + } diff --git a/Canteen/CanteenContracts/ViewModels/OrderViewModel.cs b/Canteen/CanteenContracts/ViewModels/OrderViewModel.cs index 15256e3..e29d616 100644 --- a/Canteen/CanteenContracts/ViewModels/OrderViewModel.cs +++ b/Canteen/CanteenContracts/ViewModels/OrderViewModel.cs @@ -11,15 +11,15 @@ namespace CanteenContracts.View { public class OrderViewModel : IOrderModel { - [DisplayName("Номер")] - public int Id { get; set; } + [DisplayName("ID посетителя")] public int VisitorId { get; set; } - [DisplayName("ФИО посетителя")] - public string VisitorFIO { get; set; } = string.Empty; + [DisplayName("Описание")] public string Description { get; set; } = string.Empty; [DisplayName("Сумма")] - public double Sum { get; set; } - [DisplayName("Дата создания")] - public DateTime DateCreate { get; set; } = DateTime.Now; + public double? Sum { get; set; } + [DisplayName("Блюда в заказе")] + public Dictionary OrderDishes { get; set; } = new Dictionary(); + public int Id { get; set; } } + } diff --git a/Canteen/CanteenContracts/ViewModels/ProductViewModel.cs b/Canteen/CanteenContracts/ViewModels/ProductViewModel.cs index 80fe9a6..7e8630f 100644 --- a/Canteen/CanteenContracts/ViewModels/ProductViewModel.cs +++ b/Canteen/CanteenContracts/ViewModels/ProductViewModel.cs @@ -10,12 +10,18 @@ namespace CanteenContracts.View { public class ProductViewModel : IProductModel { - public int Id { get; set; } - public int ManagerId { get; set; } [DisplayName("Название продукта")] public string ProductName { get; set; } = string.Empty; + [DisplayName("Цена")] - public double Cost { get; set; } + public double Price { get; set; } + + [DisplayName("ID менеджера")] + public int ManagerId { get; set; } + public Dictionary ProductCooks { get; set; } = new(); + + public int Id { get; set; } } + } diff --git a/Canteen/CanteenContracts/ViewModels/RoleViewModel.cs b/Canteen/CanteenContracts/ViewModels/RoleViewModel.cs deleted file mode 100644 index e45eb52..0000000 --- a/Canteen/CanteenContracts/ViewModels/RoleViewModel.cs +++ /dev/null @@ -1,19 +0,0 @@ -using CanteenDataModels.Models; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CanteenContracts.View -{ - public class RoleViewModel : IRoleModel - { - [DisplayName("Название роли")] - public string RoleName { get; set; } = string.Empty; - - public int Id { get; set; } - } -} diff --git a/Canteen/CanteenContracts/ViewModels/TablewareViewModel.cs b/Canteen/CanteenContracts/ViewModels/TablewareViewModel.cs index 2b2596e..7b728e4 100644 --- a/Canteen/CanteenContracts/ViewModels/TablewareViewModel.cs +++ b/Canteen/CanteenContracts/ViewModels/TablewareViewModel.cs @@ -10,13 +10,19 @@ namespace CanteenContracts.View { public class TablewareViewModel : ITablewareModel { - - public int Id { get; set; } + [DisplayName("ID посетителя")] public int VisitorId { get; set; } + + [DisplayName("ID заказа")] public int OrderId { get; set; } + [DisplayName("Название прибора")] public string TablewareName { get; set; } = string.Empty; + [DisplayName("Количество")] public int Count { get; set; } + + public int Id { get; set; } } + } diff --git a/Canteen/CanteenContracts/ViewModels/VisitorViewModel.cs b/Canteen/CanteenContracts/ViewModels/VisitorViewModel.cs index 759cc69..f77fadd 100644 --- a/Canteen/CanteenContracts/ViewModels/VisitorViewModel.cs +++ b/Canteen/CanteenContracts/ViewModels/VisitorViewModel.cs @@ -11,14 +11,17 @@ namespace CanteenContracts.View public class VisitorViewModel : IVisitorModel { public int Id { get; set; } + [DisplayName("ФИО посетителя")] public string FIO { get; set; } = string.Empty; + [DisplayName("Логин")] public string Login { get; set; } = string.Empty; + [DisplayName("Пароль")] public string Password { get; set; } = string.Empty; + [DisplayName("Номер телефона")] public string PhoneNumber { get; set; } = string.Empty; - public int RoleId { get; set; } } } diff --git a/Canteen/CanteenDataModels/CanteenDataModels.csproj b/Canteen/CanteenDataModels/CanteenDataModels.csproj index 7264f69..c68ed43 100644 --- a/Canteen/CanteenDataModels/CanteenDataModels.csproj +++ b/Canteen/CanteenDataModels/CanteenDataModels.csproj @@ -7,7 +7,6 @@ - diff --git a/Canteen/CanteenContracts/BindingModels/CookLinkBindingModel.cs b/Canteen/CanteenDataModels/Enums/LunchStatus.cs similarity index 54% rename from Canteen/CanteenContracts/BindingModels/CookLinkBindingModel.cs rename to Canteen/CanteenDataModels/Enums/LunchStatus.cs index 4a5d95e..7396983 100644 --- a/Canteen/CanteenContracts/BindingModels/CookLinkBindingModel.cs +++ b/Canteen/CanteenDataModels/Enums/LunchStatus.cs @@ -4,10 +4,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace CanteenContracts.BindingModels +namespace CanteenDataModels.Enums { - public class CookLinkBindingModel + public enum LunchStatus { - public int Id { get; set; } + Создан = 0, + Окончен = 1 } } diff --git a/Canteen/CanteenDataModels/Enums/OrderStatus.cs b/Canteen/CanteenDataModels/Enums/OrderStatus.cs deleted file mode 100644 index 5d79500..0000000 --- a/Canteen/CanteenDataModels/Enums/OrderStatus.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CanteenDataModels.Enums -{ - public enum OrderStatus - { - Неизвестен = -1, - Принят = 0, - Выполняется = 1, - Готов = 2, - Выдан = 3 - } -} diff --git a/Canteen/CanteenDataModels/Models/ICookModel.cs b/Canteen/CanteenDataModels/Models/ICookModel.cs index a9c900c..2bd1481 100644 --- a/Canteen/CanteenDataModels/Models/ICookModel.cs +++ b/Canteen/CanteenDataModels/Models/ICookModel.cs @@ -9,12 +9,7 @@ namespace CanteenDataModels.Models public interface ICookModel : IId { int ManagerId { get; } - string Name { get; } - - string Surname { get; } - - string Patronymic { get; } - + string FIO { get; } string Position { get; } } } diff --git a/Canteen/CanteenDataModels/Models/IDishModel.cs b/Canteen/CanteenDataModels/Models/IDishModel.cs index ab385cf..ee1991f 100644 --- a/Canteen/CanteenDataModels/Models/IDishModel.cs +++ b/Canteen/CanteenDataModels/Models/IDishModel.cs @@ -9,7 +9,7 @@ namespace CanteenDataModels.Models public interface IDishModel : IId { string DishName { get; } - double Cost { get; } + double Price { get; } int ManagerId { get; } Dictionary DishProducts { get; } } diff --git a/Canteen/CanteenDataModels/Models/ILunchModel.cs b/Canteen/CanteenDataModels/Models/ILunchModel.cs index 6529699..9ab6c5f 100644 --- a/Canteen/CanteenDataModels/Models/ILunchModel.cs +++ b/Canteen/CanteenDataModels/Models/ILunchModel.cs @@ -1,4 +1,5 @@ -using System; +using CanteenDataModels.Enums; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -10,7 +11,10 @@ namespace CanteenDataModels.Models { int VisitorId { get; } string LunchName { get; } - double Cost { get; } + double Sum { get; } + LunchStatus Status { get; } + DateTime DateCreate { get; } + DateTime? DateImplement { get; } Dictionary LunchProducts { get; } } } diff --git a/Canteen/CanteenDataModels/Models/IManagerModel.cs b/Canteen/CanteenDataModels/Models/IManagerModel.cs index da8b43c..630606d 100644 --- a/Canteen/CanteenDataModels/Models/IManagerModel.cs +++ b/Canteen/CanteenDataModels/Models/IManagerModel.cs @@ -15,7 +15,5 @@ namespace CanteenDataModels.Models string Password { get; } string PhoneNumber { get; } - - int RoleId { get; } } } diff --git a/Canteen/CanteenDataModels/Models/IOrderModel.cs b/Canteen/CanteenDataModels/Models/IOrderModel.cs index 29c0a17..c81f9fb 100644 --- a/Canteen/CanteenDataModels/Models/IOrderModel.cs +++ b/Canteen/CanteenDataModels/Models/IOrderModel.cs @@ -11,7 +11,7 @@ namespace CanteenDataModels.Models { int VisitorId { get; } string Description { get; } - double Sum { get; } - DateTime DateCreate { get; } + double? Sum { get; } + Dictionary OrderDishes { get; } } } diff --git a/Canteen/CanteenDataModels/Models/IProductModel.cs b/Canteen/CanteenDataModels/Models/IProductModel.cs index c1aa100..fd9959e 100644 --- a/Canteen/CanteenDataModels/Models/IProductModel.cs +++ b/Canteen/CanteenDataModels/Models/IProductModel.cs @@ -9,7 +9,7 @@ namespace CanteenDataModels.Models public interface IProductModel : IId { string ProductName { get; } - double Cost { get; } + double Price { get; } int ManagerId { get; } Dictionary ProductCooks { get; } } diff --git a/Canteen/CanteenDataModels/Models/IRoleModel.cs b/Canteen/CanteenDataModels/Models/IRoleModel.cs deleted file mode 100644 index 3965986..0000000 --- a/Canteen/CanteenDataModels/Models/IRoleModel.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CanteenDataModels.Models -{ - public interface IRoleModel : IId - { - string RoleName { get; } - } -} diff --git a/Canteen/CanteenDataModels/Models/IVisitorModel.cs b/Canteen/CanteenDataModels/Models/IVisitorModel.cs index 4eff790..2e62a99 100644 --- a/Canteen/CanteenDataModels/Models/IVisitorModel.cs +++ b/Canteen/CanteenDataModels/Models/IVisitorModel.cs @@ -12,6 +12,5 @@ namespace CanteenDataModels.Models string Login { get; } string Password { get; } string PhoneNumber { get; } - int RoleId { get; } } }