add contracts
This commit is contained in:
parent
618c41a5a0
commit
8a359f676f
@ -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
|
||||
|
26
Canteen/CanteenContracts/BindingModels/CookBindingModel.cs
Normal file
26
Canteen/CanteenContracts/BindingModels/CookBindingModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
22
Canteen/CanteenContracts/BindingModels/DishBindingModel.cs
Normal file
22
Canteen/CanteenContracts/BindingModels/DishBindingModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
22
Canteen/CanteenContracts/BindingModels/LunchBindingModel.cs
Normal file
22
Canteen/CanteenContracts/BindingModels/LunchBindingModel.cs
Normal file
@ -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<int, (IProductModel, int)> LunchProducts { get; set; } = new();
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
25
Canteen/CanteenContracts/BindingModels/OrderBindingModel.cs
Normal file
25
Canteen/CanteenContracts/BindingModels/OrderBindingModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
@ -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<int, ICookModel> ProductCooks{ get; set; } = new();
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
16
Canteen/CanteenContracts/BindingModels/RoleBindingModel.cs
Normal file
16
Canteen/CanteenContracts/BindingModels/RoleBindingModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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<CookViewModel>? ReadList(CookSearchModel? model);
|
||||
CookViewModel? ReadElement(CookSearchModel model);
|
||||
bool Create(CookBindingModel model);
|
||||
bool Update(CookBindingModel model);
|
||||
bool Delete(CookBindingModel model);
|
||||
}
|
||||
}
|
@ -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<DishViewModel>? ReadList(DishSearchModel? model);
|
||||
DishViewModel? ReadElement(DishSearchModel model);
|
||||
bool Create(DishBindingModel model);
|
||||
bool Update(DishBindingModel model);
|
||||
bool Delete(DishBindingModel model);
|
||||
}
|
||||
}
|
@ -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<LunchViewModel>? ReadList(LunchSearchModel? model);
|
||||
LunchViewModel? ReadElement(LunchSearchModel model);
|
||||
bool Create(LunchBindingModel model);
|
||||
bool Update(LunchBindingModel model);
|
||||
bool Delete(LunchBindingModel model);
|
||||
}
|
||||
}
|
@ -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<ManagerViewModel>? ReadList(ManagerSearchModel? model);
|
||||
ManagerViewModel? ReadElement(ManagerSearchModel model);
|
||||
bool Create(ManagerBindingModel model);
|
||||
bool Update(ManagerBindingModel model);
|
||||
bool Delete(ManagerBindingModel model);
|
||||
}
|
||||
}
|
@ -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<OrderViewModel>? ReadList(OrderSearchModel? model);
|
||||
bool CreateOrder(OrderBindingModel model);
|
||||
bool TakeOrderInWork(OrderBindingModel model);
|
||||
bool FinishOrder(OrderBindingModel model);
|
||||
bool DeliveryOrder(OrderBindingModel model);
|
||||
}
|
||||
}
|
@ -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<ProductViewModel>? ReadList(ProductSearchModel? model);
|
||||
ProductViewModel? ReadElement(ProductSearchModel model);
|
||||
bool Create(ProductBindingModel model);
|
||||
bool Update(ProductBindingModel model);
|
||||
bool Delete(ProductBindingModel model);
|
||||
}
|
||||
}
|
@ -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<RoleViewModel>? ReadList(RoleSearchModel? model);
|
||||
RoleViewModel? ReadElement(RoleSearchModel model);
|
||||
bool Create(RoleBindingModel model);
|
||||
bool Update(RoleBindingModel model);
|
||||
bool Delete(RoleBindingModel model);
|
||||
}
|
||||
}
|
@ -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<TablewareViewModel>? ReadList(TablewareSearchModel? model);
|
||||
TablewareViewModel? ReadElement(TablewareSearchModel model);
|
||||
bool Create(TablewareBindingModel model);
|
||||
bool Update(TablewareBindingModel model);
|
||||
bool Delete(TablewareBindingModel model);
|
||||
}
|
||||
}
|
@ -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<VisitorViewModel>? ReadList(VisitorSearchModel? model);
|
||||
VisitorViewModel? ReadElement(VisitorSearchModel model);
|
||||
bool Create(VisitorBindingModel model);
|
||||
bool Update(VisitorBindingModel model);
|
||||
bool Delete(VisitorBindingModel model);
|
||||
}
|
||||
}
|
21
Canteen/CanteenContracts/CanteenContracts.csproj
Normal file
21
Canteen/CanteenContracts/CanteenContracts.csproj
Normal file
@ -0,0 +1,21 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CanteenDataModels\CanteenDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="ViewModels\" />
|
||||
<Folder Include="BindingModels\" />
|
||||
<Folder Include="BusinessLogicsContracts\" />
|
||||
<Folder Include="SearchModels\" />
|
||||
<Folder Include="StoragesContracts\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
16
Canteen/CanteenContracts/SearchModels/CookSearchModel.cs
Normal file
16
Canteen/CanteenContracts/SearchModels/CookSearchModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
14
Canteen/CanteenContracts/SearchModels/DishSearchModel.cs
Normal file
14
Canteen/CanteenContracts/SearchModels/DishSearchModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
14
Canteen/CanteenContracts/SearchModels/LunchSearchModel.cs
Normal file
14
Canteen/CanteenContracts/SearchModels/LunchSearchModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
17
Canteen/CanteenContracts/SearchModels/ManagerSearchModel.cs
Normal file
17
Canteen/CanteenContracts/SearchModels/ManagerSearchModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
16
Canteen/CanteenContracts/SearchModels/OrderSearchModel.cs
Normal file
16
Canteen/CanteenContracts/SearchModels/OrderSearchModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
14
Canteen/CanteenContracts/SearchModels/ProductSearchModel.cs
Normal file
14
Canteen/CanteenContracts/SearchModels/ProductSearchModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
15
Canteen/CanteenContracts/SearchModels/RoleSearchModel.cs
Normal file
15
Canteen/CanteenContracts/SearchModels/RoleSearchModel.cs
Normal file
@ -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; }
|
||||
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
17
Canteen/CanteenContracts/SearchModels/VisitorSearchModel.cs
Normal file
17
Canteen/CanteenContracts/SearchModels/VisitorSearchModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
12
Canteen/CanteenContracts/StoragesContracts/ICookStorage.cs
Normal file
12
Canteen/CanteenContracts/StoragesContracts/ICookStorage.cs
Normal file
@ -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
|
||||
{
|
||||
}
|
||||
}
|
12
Canteen/CanteenContracts/StoragesContracts/IDishStorage.cs
Normal file
12
Canteen/CanteenContracts/StoragesContracts/IDishStorage.cs
Normal file
@ -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
|
||||
{
|
||||
}
|
||||
}
|
12
Canteen/CanteenContracts/StoragesContracts/ILunchStorage.cs
Normal file
12
Canteen/CanteenContracts/StoragesContracts/ILunchStorage.cs
Normal file
@ -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
|
||||
{
|
||||
}
|
||||
}
|
@ -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
|
||||
{
|
||||
}
|
||||
}
|
12
Canteen/CanteenContracts/StoragesContracts/IOrderStorage.cs
Normal file
12
Canteen/CanteenContracts/StoragesContracts/IOrderStorage.cs
Normal file
@ -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
|
||||
{
|
||||
}
|
||||
}
|
@ -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
|
||||
{
|
||||
}
|
||||
}
|
12
Canteen/CanteenContracts/StoragesContracts/IRoleStorage.cs
Normal file
12
Canteen/CanteenContracts/StoragesContracts/IRoleStorage.cs
Normal file
@ -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
|
||||
{
|
||||
}
|
||||
}
|
@ -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
|
||||
{
|
||||
}
|
||||
}
|
@ -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
|
||||
{
|
||||
}
|
||||
}
|
28
Canteen/CanteenContracts/ViewModels/CookViewModel.cs
Normal file
28
Canteen/CanteenContracts/ViewModels/CookViewModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
21
Canteen/CanteenContracts/ViewModels/DishViewModel.cs
Normal file
21
Canteen/CanteenContracts/ViewModels/DishViewModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
21
Canteen/CanteenContracts/ViewModels/LunchViewModel.cs
Normal file
21
Canteen/CanteenContracts/ViewModels/LunchViewModel.cs
Normal file
@ -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<int, (IProductModel, int)> LunchProducts { get; set; } = new();
|
||||
}
|
||||
}
|
26
Canteen/CanteenContracts/ViewModels/ManagerViewModel.cs
Normal file
26
Canteen/CanteenContracts/ViewModels/ManagerViewModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
35
Canteen/CanteenContracts/ViewModels/OrderViewModel.cs
Normal file
35
Canteen/CanteenContracts/ViewModels/OrderViewModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
24
Canteen/CanteenContracts/ViewModels/ProductViewModel.cs
Normal file
24
Canteen/CanteenContracts/ViewModels/ProductViewModel.cs
Normal file
@ -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<int, ICookModel> ProductCooks { get; set; } = new();
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
19
Canteen/CanteenContracts/ViewModels/RoleViewModel.cs
Normal file
19
Canteen/CanteenContracts/ViewModels/RoleViewModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
22
Canteen/CanteenContracts/ViewModels/TablewareViewModel.cs
Normal file
22
Canteen/CanteenContracts/ViewModels/TablewareViewModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
26
Canteen/CanteenContracts/ViewModels/VisitorViewModel.cs
Normal file
26
Canteen/CanteenContracts/ViewModels/VisitorViewModel.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user