diff --git a/Canteen/Canteen.sln b/Canteen/Canteen.sln index bd907b9..77f6345 100644 --- a/Canteen/Canteen.sln +++ b/Canteen/Canteen.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 17.4.33403.182 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CanteenDataModels", "CanteenDataModels\CanteenDataModels.csproj", "{F11EA5AA-83D7-4D06-9DC5-E2C8E726BC4A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CanteenContracts", "CanteenContracts\CanteenContracts.csproj", "{A4B80B56-049E-4BBE-938A-7AFB99F13B6E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {F11EA5AA-83D7-4D06-9DC5-E2C8E726BC4A}.Debug|Any CPU.Build.0 = Debug|Any CPU {F11EA5AA-83D7-4D06-9DC5-E2C8E726BC4A}.Release|Any CPU.ActiveCfg = Release|Any CPU {F11EA5AA-83D7-4D06-9DC5-E2C8E726BC4A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4B80B56-049E-4BBE-938A-7AFB99F13B6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4B80B56-049E-4BBE-938A-7AFB99F13B6E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4B80B56-049E-4BBE-938A-7AFB99F13B6E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4B80B56-049E-4BBE-938A-7AFB99F13B6E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Canteen/CanteenContracts/BindingModels/CookBindingModel.cs b/Canteen/CanteenContracts/BindingModels/CookBindingModel.cs new file mode 100644 index 0000000..ee148db --- /dev/null +++ b/Canteen/CanteenContracts/BindingModels/CookBindingModel.cs @@ -0,0 +1,26 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.BindingModels +{ + public class CookBindingModel : ICookModel + { + public string Name { get; set; } = string.Empty; + + public string Surname { get; set; } = string.Empty; + + public string Patronymic { get; set; } = string.Empty; + + public DateTime DateOfBirth { get; set; } + + public string Position { get; set; } + + public int ClientId { get; set; } + + public int Id { get; set; } + } +} diff --git a/Canteen/CanteenContracts/BindingModels/DishBindingModel.cs b/Canteen/CanteenContracts/BindingModels/DishBindingModel.cs new file mode 100644 index 0000000..f3d8be7 --- /dev/null +++ b/Canteen/CanteenContracts/BindingModels/DishBindingModel.cs @@ -0,0 +1,22 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.BindingModels +{ + public class DishBindingModel : IDishModel + { + public string DishName { get; set; } = string.Empty; + + public double Cost { get; set; } + + public int ClientId { get; set; } + + public int ProductId { get; set; } + + public int Id { get; set; } + } +} diff --git a/Canteen/CanteenContracts/BindingModels/LunchBindingModel.cs b/Canteen/CanteenContracts/BindingModels/LunchBindingModel.cs new file mode 100644 index 0000000..1d16246 --- /dev/null +++ b/Canteen/CanteenContracts/BindingModels/LunchBindingModel.cs @@ -0,0 +1,22 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.BindingModels +{ + public class LunchBindingModel : ILunchModel + { + public string LunchName { get; set; } = string.Empty; + + public double Cost { get; set; } + + public int VisitorId { get; set; } + + public Dictionary LunchProducts { get; set; } = new(); + + public int Id { get; set; } + } +} diff --git a/Canteen/CanteenContracts/BindingModels/ManagerBindingModel.cs b/Canteen/CanteenContracts/BindingModels/ManagerBindingModel.cs new file mode 100644 index 0000000..0312a91 --- /dev/null +++ b/Canteen/CanteenContracts/BindingModels/ManagerBindingModel.cs @@ -0,0 +1,24 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.BindingModels +{ + public class ManagerBindingModel : IManagerModel + { + public string FIO { get; set; } = string.Empty; + + public string Login { get; set; } = string.Empty; + + public string Password { get; set; } = string.Empty; + + public string PhoneNumber { get; set; } = string.Empty; + + public int RoleId { get; set; } + + public int Id { get; set; } + } +} diff --git a/Canteen/CanteenContracts/BindingModels/OrderBindingModel.cs b/Canteen/CanteenContracts/BindingModels/OrderBindingModel.cs new file mode 100644 index 0000000..9c18892 --- /dev/null +++ b/Canteen/CanteenContracts/BindingModels/OrderBindingModel.cs @@ -0,0 +1,25 @@ +using CanteenDataModels.Enums; +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.BindingModels +{ + public class OrderBindingModel : IOrderModel + { + public int ClientId { 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; } + + public int Id { get; set; } + } +} diff --git a/Canteen/CanteenContracts/BindingModels/ProductBindingModel.cs b/Canteen/CanteenContracts/BindingModels/ProductBindingModel.cs new file mode 100644 index 0000000..cca65aa --- /dev/null +++ b/Canteen/CanteenContracts/BindingModels/ProductBindingModel.cs @@ -0,0 +1,22 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.BindingModels +{ + public class ProductBindingModel : IProductModel + { + public string ProductName { get; set; } = string.Empty; + + public double Cost { get; set; } + + public int ClientId { get; set; } + + public Dictionary ProductCooks{ get; set; } = new(); + + public int Id { get; set; } + } +} diff --git a/Canteen/CanteenContracts/BindingModels/RoleBindingModel.cs b/Canteen/CanteenContracts/BindingModels/RoleBindingModel.cs new file mode 100644 index 0000000..076b74e --- /dev/null +++ b/Canteen/CanteenContracts/BindingModels/RoleBindingModel.cs @@ -0,0 +1,16 @@ +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 string RoleName { get; set; } = string.Empty; + + public int Id { get; set; } + } +} diff --git a/Canteen/CanteenContracts/BindingModels/TablewareBindingModel.cs b/Canteen/CanteenContracts/BindingModels/TablewareBindingModel.cs new file mode 100644 index 0000000..51d398a --- /dev/null +++ b/Canteen/CanteenContracts/BindingModels/TablewareBindingModel.cs @@ -0,0 +1,20 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.BindingModels +{ + public class TablewareBindingModel : ITablewareModel + { + public string TablewareName { get; set; } = string.Empty; + + public int ClientId { get; set; } + + public int OrderId { get; set; } + + public int Id { get; set; } + } +} diff --git a/Canteen/CanteenContracts/BindingModels/VisitorBindingModel.cs b/Canteen/CanteenContracts/BindingModels/VisitorBindingModel.cs new file mode 100644 index 0000000..b843a30 --- /dev/null +++ b/Canteen/CanteenContracts/BindingModels/VisitorBindingModel.cs @@ -0,0 +1,24 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.BindingModels +{ + public class VisitorBindingModel : IVisitorModel + { + public string FIO { get; set; } = string.Empty; + + public string Login { get; set; } = string.Empty; + + public string Password { get; set; } = string.Empty; + + public string PhoneNumber { get; set; } = string.Empty; + + public int RoleId { get; set; } + + public int Id { get; set; } + } +} diff --git a/Canteen/CanteenContracts/BusinessLogicsContracts/ICookLogic.cs b/Canteen/CanteenContracts/BusinessLogicsContracts/ICookLogic.cs new file mode 100644 index 0000000..7103e89 --- /dev/null +++ b/Canteen/CanteenContracts/BusinessLogicsContracts/ICookLogic.cs @@ -0,0 +1,20 @@ +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 ICookLogic + { + List? ReadList(CookSearchModel? model); + CookViewModel? ReadElement(CookSearchModel model); + bool Create(CookBindingModel model); + bool Update(CookBindingModel model); + bool Delete(CookBindingModel model); + } +} diff --git a/Canteen/CanteenContracts/BusinessLogicsContracts/IDishLogic.cs b/Canteen/CanteenContracts/BusinessLogicsContracts/IDishLogic.cs new file mode 100644 index 0000000..d328dcc --- /dev/null +++ b/Canteen/CanteenContracts/BusinessLogicsContracts/IDishLogic.cs @@ -0,0 +1,20 @@ +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 IDishLogic + { + List? ReadList(DishSearchModel? model); + DishViewModel? ReadElement(DishSearchModel model); + bool Create(DishBindingModel model); + bool Update(DishBindingModel model); + bool Delete(DishBindingModel model); + } +} diff --git a/Canteen/CanteenContracts/BusinessLogicsContracts/ILunchLogic.cs b/Canteen/CanteenContracts/BusinessLogicsContracts/ILunchLogic.cs new file mode 100644 index 0000000..737751f --- /dev/null +++ b/Canteen/CanteenContracts/BusinessLogicsContracts/ILunchLogic.cs @@ -0,0 +1,20 @@ +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 ILunchLogic + { + List? ReadList(LunchSearchModel? model); + LunchViewModel? ReadElement(LunchSearchModel model); + bool Create(LunchBindingModel model); + bool Update(LunchBindingModel model); + bool Delete(LunchBindingModel model); + } +} diff --git a/Canteen/CanteenContracts/BusinessLogicsContracts/IManagerLogic.cs b/Canteen/CanteenContracts/BusinessLogicsContracts/IManagerLogic.cs new file mode 100644 index 0000000..993707d --- /dev/null +++ b/Canteen/CanteenContracts/BusinessLogicsContracts/IManagerLogic.cs @@ -0,0 +1,20 @@ +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 IManagerLogic + { + List? ReadList(ManagerSearchModel? model); + ManagerViewModel? ReadElement(ManagerSearchModel model); + bool Create(ManagerBindingModel model); + bool Update(ManagerBindingModel model); + bool Delete(ManagerBindingModel model); + } +} diff --git a/Canteen/CanteenContracts/BusinessLogicsContracts/IOrderLogic.cs b/Canteen/CanteenContracts/BusinessLogicsContracts/IOrderLogic.cs new file mode 100644 index 0000000..bdcac32 --- /dev/null +++ b/Canteen/CanteenContracts/BusinessLogicsContracts/IOrderLogic.cs @@ -0,0 +1,20 @@ +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 IOrderLogic + { + List? ReadList(OrderSearchModel? model); + bool CreateOrder(OrderBindingModel model); + bool TakeOrderInWork(OrderBindingModel model); + bool FinishOrder(OrderBindingModel model); + bool DeliveryOrder(OrderBindingModel model); + } +} diff --git a/Canteen/CanteenContracts/BusinessLogicsContracts/IProductLogic.cs b/Canteen/CanteenContracts/BusinessLogicsContracts/IProductLogic.cs new file mode 100644 index 0000000..d41ab54 --- /dev/null +++ b/Canteen/CanteenContracts/BusinessLogicsContracts/IProductLogic.cs @@ -0,0 +1,20 @@ +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 IProductLogic + { + List? ReadList(ProductSearchModel? model); + ProductViewModel? ReadElement(ProductSearchModel model); + bool Create(ProductBindingModel model); + bool Update(ProductBindingModel model); + bool Delete(ProductBindingModel model); + } +} diff --git a/Canteen/CanteenContracts/BusinessLogicsContracts/IRoleLogic.cs b/Canteen/CanteenContracts/BusinessLogicsContracts/IRoleLogic.cs new file mode 100644 index 0000000..91ca137 --- /dev/null +++ b/Canteen/CanteenContracts/BusinessLogicsContracts/IRoleLogic.cs @@ -0,0 +1,20 @@ +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/BusinessLogicsContracts/ITablewareLogic.cs b/Canteen/CanteenContracts/BusinessLogicsContracts/ITablewareLogic.cs new file mode 100644 index 0000000..7181007 --- /dev/null +++ b/Canteen/CanteenContracts/BusinessLogicsContracts/ITablewareLogic.cs @@ -0,0 +1,20 @@ +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 ITablewareLogic + { + List? ReadList(TablewareSearchModel? model); + TablewareViewModel? ReadElement(TablewareSearchModel model); + bool Create(TablewareBindingModel model); + bool Update(TablewareBindingModel model); + bool Delete(TablewareBindingModel model); + } +} diff --git a/Canteen/CanteenContracts/BusinessLogicsContracts/IVisitorLogic.cs b/Canteen/CanteenContracts/BusinessLogicsContracts/IVisitorLogic.cs new file mode 100644 index 0000000..2e074a4 --- /dev/null +++ b/Canteen/CanteenContracts/BusinessLogicsContracts/IVisitorLogic.cs @@ -0,0 +1,20 @@ +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 IVisitorLogic + { + List? ReadList(VisitorSearchModel? model); + VisitorViewModel? ReadElement(VisitorSearchModel model); + bool Create(VisitorBindingModel model); + bool Update(VisitorBindingModel model); + bool Delete(VisitorBindingModel model); + } +} diff --git a/Canteen/CanteenContracts/CanteenContracts.csproj b/Canteen/CanteenContracts/CanteenContracts.csproj new file mode 100644 index 0000000..88142b5 --- /dev/null +++ b/Canteen/CanteenContracts/CanteenContracts.csproj @@ -0,0 +1,21 @@ + + + + net6.0 + enable + enable + + + + + + + + + + + + + + + diff --git a/Canteen/CanteenContracts/SearchModels/CookSearchModel.cs b/Canteen/CanteenContracts/SearchModels/CookSearchModel.cs new file mode 100644 index 0000000..d1b107f --- /dev/null +++ b/Canteen/CanteenContracts/SearchModels/CookSearchModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.SearchModel +{ + public class CookSearchModel + { + public int? Id { 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 new file mode 100644 index 0000000..a2d8b21 --- /dev/null +++ b/Canteen/CanteenContracts/SearchModels/DishSearchModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.SearchModel +{ + public class DishSearchModel + { + public int? Id { get; set; } + public string? DishName { get; set; } + } +} diff --git a/Canteen/CanteenContracts/SearchModels/LunchSearchModel.cs b/Canteen/CanteenContracts/SearchModels/LunchSearchModel.cs new file mode 100644 index 0000000..f72c5e5 --- /dev/null +++ b/Canteen/CanteenContracts/SearchModels/LunchSearchModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.SearchModel +{ + public class LunchSearchModel + { + public int? Id { get; set; } + public string? LunchName { get; set; } + } +} diff --git a/Canteen/CanteenContracts/SearchModels/ManagerSearchModel.cs b/Canteen/CanteenContracts/SearchModels/ManagerSearchModel.cs new file mode 100644 index 0000000..ac2b603 --- /dev/null +++ b/Canteen/CanteenContracts/SearchModels/ManagerSearchModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +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; } + } +} diff --git a/Canteen/CanteenContracts/SearchModels/OrderSearchModel.cs b/Canteen/CanteenContracts/SearchModels/OrderSearchModel.cs new file mode 100644 index 0000000..0ee00b2 --- /dev/null +++ b/Canteen/CanteenContracts/SearchModels/OrderSearchModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.SearchModel +{ + public class OrderSearchModel + { + public int? Id { get; set; } + public int? ClientId { 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 new file mode 100644 index 0000000..0324480 --- /dev/null +++ b/Canteen/CanteenContracts/SearchModels/ProductSearchModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.SearchModel +{ + public class ProductSearchModel + { + public int? Id { get; set; } + public string? ProductName { get; set; } + } +} diff --git a/Canteen/CanteenContracts/SearchModels/RoleSearchModel.cs b/Canteen/CanteenContracts/SearchModels/RoleSearchModel.cs new file mode 100644 index 0000000..e3a5a00 --- /dev/null +++ b/Canteen/CanteenContracts/SearchModels/RoleSearchModel.cs @@ -0,0 +1,15 @@ +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 new file mode 100644 index 0000000..3e9cf43 --- /dev/null +++ b/Canteen/CanteenContracts/SearchModels/TablewareSearchModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.SearchModel +{ + public class TablewareSearchModel + { + public int? Id { get; set; } + public string? TablewareName { get; set; } + } +} diff --git a/Canteen/CanteenContracts/SearchModels/VisitorSearchModel.cs b/Canteen/CanteenContracts/SearchModels/VisitorSearchModel.cs new file mode 100644 index 0000000..a79b25c --- /dev/null +++ b/Canteen/CanteenContracts/SearchModels/VisitorSearchModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +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; } + } +} diff --git a/Canteen/CanteenContracts/StoragesContracts/ICookStorage.cs b/Canteen/CanteenContracts/StoragesContracts/ICookStorage.cs new file mode 100644 index 0000000..d9af3ca --- /dev/null +++ b/Canteen/CanteenContracts/StoragesContracts/ICookStorage.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.StoragesContracts +{ + internal interface ICookStorage + { + } +} diff --git a/Canteen/CanteenContracts/StoragesContracts/IDishStorage.cs b/Canteen/CanteenContracts/StoragesContracts/IDishStorage.cs new file mode 100644 index 0000000..be1e87c --- /dev/null +++ b/Canteen/CanteenContracts/StoragesContracts/IDishStorage.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.StoragesContracts +{ + internal interface IDishStorage + { + } +} diff --git a/Canteen/CanteenContracts/StoragesContracts/ILunchStorage.cs b/Canteen/CanteenContracts/StoragesContracts/ILunchStorage.cs new file mode 100644 index 0000000..2c0a60d --- /dev/null +++ b/Canteen/CanteenContracts/StoragesContracts/ILunchStorage.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.StoragesContracts +{ + internal interface ILunchStorage + { + } +} diff --git a/Canteen/CanteenContracts/StoragesContracts/IManagerStorage.cs b/Canteen/CanteenContracts/StoragesContracts/IManagerStorage.cs new file mode 100644 index 0000000..ffede3b --- /dev/null +++ b/Canteen/CanteenContracts/StoragesContracts/IManagerStorage.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.StoragesContracts +{ + internal interface IManagerStorage + { + } +} diff --git a/Canteen/CanteenContracts/StoragesContracts/IOrderStorage.cs b/Canteen/CanteenContracts/StoragesContracts/IOrderStorage.cs new file mode 100644 index 0000000..60254b0 --- /dev/null +++ b/Canteen/CanteenContracts/StoragesContracts/IOrderStorage.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.StoragesContracts +{ + internal interface IOrderStorage + { + } +} diff --git a/Canteen/CanteenContracts/StoragesContracts/IProductStorage.cs b/Canteen/CanteenContracts/StoragesContracts/IProductStorage.cs new file mode 100644 index 0000000..01c2133 --- /dev/null +++ b/Canteen/CanteenContracts/StoragesContracts/IProductStorage.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.StoragesContracts +{ + internal interface IProductStorage + { + } +} diff --git a/Canteen/CanteenContracts/StoragesContracts/IRoleStorage.cs b/Canteen/CanteenContracts/StoragesContracts/IRoleStorage.cs new file mode 100644 index 0000000..da7d238 --- /dev/null +++ b/Canteen/CanteenContracts/StoragesContracts/IRoleStorage.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.StoragesContracts +{ + internal interface IRoleStorage + { + } +} diff --git a/Canteen/CanteenContracts/StoragesContracts/ITablewarerStorage.cs b/Canteen/CanteenContracts/StoragesContracts/ITablewarerStorage.cs new file mode 100644 index 0000000..85988e5 --- /dev/null +++ b/Canteen/CanteenContracts/StoragesContracts/ITablewarerStorage.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.StoragesContracts +{ + internal interface ITablewarerStorage + { + } +} diff --git a/Canteen/CanteenContracts/StoragesContracts/IVisitorStorage.cs b/Canteen/CanteenContracts/StoragesContracts/IVisitorStorage.cs new file mode 100644 index 0000000..7ba1da3 --- /dev/null +++ b/Canteen/CanteenContracts/StoragesContracts/IVisitorStorage.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.StoragesContracts +{ + internal interface IVisitorStorage + { + } +} diff --git a/Canteen/CanteenContracts/ViewModels/CookViewModel.cs b/Canteen/CanteenContracts/ViewModels/CookViewModel.cs new file mode 100644 index 0000000..3a4b534 --- /dev/null +++ b/Canteen/CanteenContracts/ViewModels/CookViewModel.cs @@ -0,0 +1,28 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +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 DateTime DateOfBirth { get; set; } + [DisplayName("Должность")] + public string Position { get; set; } = string.Empty; + + public int ClientId { get; set; } + + public int Id { get; set; } + } +} diff --git a/Canteen/CanteenContracts/ViewModels/DishViewModel.cs b/Canteen/CanteenContracts/ViewModels/DishViewModel.cs new file mode 100644 index 0000000..f132125 --- /dev/null +++ b/Canteen/CanteenContracts/ViewModels/DishViewModel.cs @@ -0,0 +1,21 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.View +{ + public class DishViewModel : IDishModel + { + public int Id { get; set; } + public int VisitorId { get; set; } + public int ProductId { get; set; } + [DisplayName("Название блюда")] + public string DishName { get; set; } = string.Empty; + [DisplayName("Цена")] + public double Cost { get; set; } + } +} diff --git a/Canteen/CanteenContracts/ViewModels/LunchViewModel.cs b/Canteen/CanteenContracts/ViewModels/LunchViewModel.cs new file mode 100644 index 0000000..0ba81e0 --- /dev/null +++ b/Canteen/CanteenContracts/ViewModels/LunchViewModel.cs @@ -0,0 +1,21 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.View +{ + public class LunchViewModel : ILunchModel + { + public int Id { get; set; } + public int VisitorId { get; set; } + [DisplayName("Название обеда")] + public string LunchName { get; set; } = string.Empty; + [DisplayName("Цена")] + public double Cost { get; set; } + public Dictionary LunchProducts { get; set; } = new(); + } +} diff --git a/Canteen/CanteenContracts/ViewModels/ManagerViewModel.cs b/Canteen/CanteenContracts/ViewModels/ManagerViewModel.cs new file mode 100644 index 0000000..3cc0559 --- /dev/null +++ b/Canteen/CanteenContracts/ViewModels/ManagerViewModel.cs @@ -0,0 +1,26 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.View +{ + public class ManagerViewModel : IManagerModel + { + [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; } + + public int Id { get; set; } + } +} diff --git a/Canteen/CanteenContracts/ViewModels/OrderViewModel.cs b/Canteen/CanteenContracts/ViewModels/OrderViewModel.cs new file mode 100644 index 0000000..f954e8d --- /dev/null +++ b/Canteen/CanteenContracts/ViewModels/OrderViewModel.cs @@ -0,0 +1,35 @@ +using CanteenDataModels.Enums; +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.View +{ + public class OrderViewModel : IOrderModel + { + [DisplayName("Номер")] + public int Id { get; set; } + public int LunchId { get; set; } + + public int ClientId { get; set; } + [DisplayName("ФИО посетителя")] + public string ClientFIO { get; set; } = string.Empty; + + [DisplayName("Обед")] + public string LunchName { get; set; } = string.Empty; + [DisplayName("Количество")] + public int Count { get; set; } + [DisplayName("Сумма")] + public double Sum { get; set; } + [DisplayName("Статус")] + public OrderStatus Status { get; set; } = OrderStatus.Неизвестен; + [DisplayName("Дата создания")] + public DateTime DateCreate { get; set; } = DateTime.Now; + [DisplayName("Дата выполнения")] + public DateTime? DateImplement { get; set; } + } +} diff --git a/Canteen/CanteenContracts/ViewModels/ProductViewModel.cs b/Canteen/CanteenContracts/ViewModels/ProductViewModel.cs new file mode 100644 index 0000000..8300dd9 --- /dev/null +++ b/Canteen/CanteenContracts/ViewModels/ProductViewModel.cs @@ -0,0 +1,24 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.View +{ + public class ProductViewModel : IProductModel + { + [DisplayName("Название продукта")] + public string ProductName { get; set; } = string.Empty; + [DisplayName("Цена")] + public double Cost { get; set; } + + public int ClientId { 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 new file mode 100644 index 0000000..e45eb52 --- /dev/null +++ b/Canteen/CanteenContracts/ViewModels/RoleViewModel.cs @@ -0,0 +1,19 @@ +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 new file mode 100644 index 0000000..38fc433 --- /dev/null +++ b/Canteen/CanteenContracts/ViewModels/TablewareViewModel.cs @@ -0,0 +1,22 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.View +{ + public class TablewareViewModel : ITablewareModel + { + [DisplayName("Название прибора")] + public string TablewareName { get; set; } = string.Empty; + + public int ClientId { get; set; } + + public int OrderId { get; set; } + + public int Id { get; set; } + } +} diff --git a/Canteen/CanteenContracts/ViewModels/VisitorViewModel.cs b/Canteen/CanteenContracts/ViewModels/VisitorViewModel.cs new file mode 100644 index 0000000..5728334 --- /dev/null +++ b/Canteen/CanteenContracts/ViewModels/VisitorViewModel.cs @@ -0,0 +1,26 @@ +using CanteenDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CanteenContracts.View +{ + public class VisitorViewModel : IVisitorModel + { + [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; } + + public int Id { get; set; } + } +}