Слой контрактов
This commit is contained in:
parent
2063f7c4d8
commit
28a3569fed
@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SushiBarView", "SushiBar\Su
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SushiBarDataModels", "SushiBarDataModels\SushiBarDataModels.csproj", "{C373ED9F-747E-47D0-9B7C-B65E062CD537}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SushiBarDataModels", "SushiBarDataModels\SushiBarDataModels.csproj", "{C373ED9F-747E-47D0-9B7C-B65E062CD537}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SushiBarContracts", "SushiBarContracts\SushiBarContracts.csproj", "{1FD289B3-1422-4535-8969-2F320754517B}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -21,6 +23,10 @@ Global
|
|||||||
{C373ED9F-747E-47D0-9B7C-B65E062CD537}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{C373ED9F-747E-47D0-9B7C-B65E062CD537}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{C373ED9F-747E-47D0-9B7C-B65E062CD537}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{C373ED9F-747E-47D0-9B7C-B65E062CD537}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{C373ED9F-747E-47D0-9B7C-B65E062CD537}.Release|Any CPU.Build.0 = Release|Any CPU
|
{C373ED9F-747E-47D0-9B7C-B65E062CD537}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1FD289B3-1422-4535-8969-2F320754517B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1FD289B3-1422-4535-8969-2F320754517B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1FD289B3-1422-4535-8969-2F320754517B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1FD289B3-1422-4535-8969-2F320754517B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
using SushiBarContracts.StoragesContracts;
|
||||||
|
using SushiBarDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class BuyerBindingModel : IBuyerModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string BuyerName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public DateTime? BuyerBirthDate { get; set; }
|
||||||
|
}
|
||||||
|
}
|
24
SushiBar/SushiBarContracts/BindingModels/CookBindingModel.cs
Normal file
24
SushiBar/SushiBarContracts/BindingModels/CookBindingModel.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using SushiBarDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class CookBindingModel : ICookModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string CookName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string CookSurname { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public int Experience { get; set; }
|
||||||
|
|
||||||
|
public string PhoneNumber { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string Passport { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
21
SushiBar/SushiBarContracts/BindingModels/MenuBindingModel.cs
Normal file
21
SushiBar/SushiBarContracts/BindingModels/MenuBindingModel.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using SushiBarDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class MenuBindingModel : IMenuModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string FoodName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public double Price { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
using SushiBarDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class PlaceBindingModel : IPlaceModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public int PlaceNumber { get; set; }
|
||||||
|
|
||||||
|
public int CountPlaces { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
29
SushiBar/SushiBarContracts/BindingModels/TaskBindingModel.cs
Normal file
29
SushiBar/SushiBarContracts/BindingModels/TaskBindingModel.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using SushiBarDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class TaskBindingModel : ITaskModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public DateTime TaskDate { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
public SushiBarDataModels.Enum.TaskStatus Status { get; set; } = SushiBarDataModels.Enum.TaskStatus.Неизвестен;
|
||||||
|
|
||||||
|
public double FullPrice { get; set; }
|
||||||
|
|
||||||
|
public int PlaceId { get; set; }
|
||||||
|
|
||||||
|
public int CookId { get; set; }
|
||||||
|
|
||||||
|
public int BuyerId { get; set; }
|
||||||
|
|
||||||
|
public int MenuId { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using SushiBarContracts.BindingModels;
|
||||||
|
using SushiBarContracts.SearchModels;
|
||||||
|
using SushiBarContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.BusinessLogicContracts
|
||||||
|
{
|
||||||
|
public interface IBuyerLogic
|
||||||
|
{
|
||||||
|
List<BuyerViewModel>? ReadList(BuyerSearchModel? model);
|
||||||
|
BuyerViewModel? ReadElement(BuyerSearchModel model);
|
||||||
|
|
||||||
|
bool Create(BuyerBindingModel model);
|
||||||
|
bool Update(BuyerBindingModel model);
|
||||||
|
bool Delete(BuyerBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using SushiBarContracts.BindingModels;
|
||||||
|
using SushiBarContracts.SearchModels;
|
||||||
|
using SushiBarContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.BusinessLogicContracts
|
||||||
|
{
|
||||||
|
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,21 @@
|
|||||||
|
using SushiBarContracts.BindingModels;
|
||||||
|
using SushiBarContracts.SearchModels;
|
||||||
|
using SushiBarContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.BusinessLogicContracts
|
||||||
|
{
|
||||||
|
public interface IMenuLogic
|
||||||
|
{
|
||||||
|
List<MenuViewModel>? ReadList(MenuSearchModel? model);
|
||||||
|
MenuViewModel? ReadElement(MenuSearchModel model);
|
||||||
|
|
||||||
|
bool Create(MenuBindingModel model);
|
||||||
|
bool Update(MenuBindingModel model);
|
||||||
|
bool Delete(MenuBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using SushiBarContracts.BindingModels;
|
||||||
|
using SushiBarContracts.SearchModels;
|
||||||
|
using SushiBarContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.BusinessLogicContracts
|
||||||
|
{
|
||||||
|
public interface IPlaceLogic
|
||||||
|
{
|
||||||
|
List<PlaceViewModel>? ReadList(PlaceSearchModel? model);
|
||||||
|
PlaceViewModel? ReadElement(PlaceSearchModel model);
|
||||||
|
|
||||||
|
bool Create(PlaceBindingModel model);
|
||||||
|
bool Update(PlaceBindingModel model);
|
||||||
|
bool Delete(PlaceBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using SushiBarContracts.BindingModels;
|
||||||
|
using SushiBarContracts.SearchModels;
|
||||||
|
using SushiBarContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.BusinessLogicContracts
|
||||||
|
{
|
||||||
|
public interface ITaskLogic
|
||||||
|
{
|
||||||
|
List<TaskViewModel>? ReadList(TaskSearchModel? model);
|
||||||
|
TaskViewModel? ReadElement(TaskSearchModel model);
|
||||||
|
|
||||||
|
bool Create(TaskBindingModel model);
|
||||||
|
bool Update(TaskBindingModel model);
|
||||||
|
bool Delete(TaskBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
14
SushiBar/SushiBarContracts/SearchModels/BuyerSearchModel.cs
Normal file
14
SushiBar/SushiBarContracts/SearchModels/BuyerSearchModel.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class BuyerSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? BuyerName { get; set; }
|
||||||
|
}
|
||||||
|
}
|
14
SushiBar/SushiBarContracts/SearchModels/CookSearchModel.cs
Normal file
14
SushiBar/SushiBarContracts/SearchModels/CookSearchModel.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class CookSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? CookName { get; set; }
|
||||||
|
}
|
||||||
|
}
|
14
SushiBar/SushiBarContracts/SearchModels/MenuSearchModel.cs
Normal file
14
SushiBar/SushiBarContracts/SearchModels/MenuSearchModel.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class MenuSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? FoodName { get; set; }
|
||||||
|
}
|
||||||
|
}
|
14
SushiBar/SushiBarContracts/SearchModels/PlaceSearchModel.cs
Normal file
14
SushiBar/SushiBarContracts/SearchModels/PlaceSearchModel.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class PlaceSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public int? PlaceNumber { get; set; }
|
||||||
|
}
|
||||||
|
}
|
13
SushiBar/SushiBarContracts/SearchModels/TaskSearchModel.cs
Normal file
13
SushiBar/SushiBarContracts/SearchModels/TaskSearchModel.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class TaskSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using SushiBarContracts.SearchModels;
|
||||||
|
using SushiBarContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IBuyerStorage
|
||||||
|
{
|
||||||
|
List<BuyerViewModel> GetFullList();
|
||||||
|
List<BuyerViewModel> GetFilteredList(BuyerSearchModel model);
|
||||||
|
|
||||||
|
BuyerViewModel? GetElement(BuyerSearchModel model);
|
||||||
|
BuyerViewModel? Insert(BuyerSearchModel model);
|
||||||
|
BuyerViewModel? Update(BuyerSearchModel model);
|
||||||
|
BuyerViewModel? Delete(BuyerSearchModel model);
|
||||||
|
}
|
||||||
|
}
|
21
SushiBar/SushiBarContracts/StoragesContracts/ICookStorage.cs
Normal file
21
SushiBar/SushiBarContracts/StoragesContracts/ICookStorage.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using SushiBarContracts.SearchModels;
|
||||||
|
using SushiBarContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface ICookStorage
|
||||||
|
{
|
||||||
|
List<CookViewModel> GetFullList();
|
||||||
|
List<CookViewModel> GetFilteredList(CookSearchModel model);
|
||||||
|
|
||||||
|
CookViewModel? GetElement(CookSearchModel model);
|
||||||
|
CookViewModel? Insert(CookSearchModel model);
|
||||||
|
CookViewModel? Update(CookSearchModel model);
|
||||||
|
CookViewModel? Delete(CookSearchModel model);
|
||||||
|
}
|
||||||
|
}
|
21
SushiBar/SushiBarContracts/StoragesContracts/IMenuStorage.cs
Normal file
21
SushiBar/SushiBarContracts/StoragesContracts/IMenuStorage.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using SushiBarContracts.SearchModels;
|
||||||
|
using SushiBarContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IMenuStorage
|
||||||
|
{
|
||||||
|
List<MenuViewModel> GetFullList();
|
||||||
|
List<MenuViewModel> GetFilteredList(MenuSearchModel model);
|
||||||
|
|
||||||
|
MenuViewModel? GetElement(MenuSearchModel model);
|
||||||
|
MenuViewModel? Insert(MenuSearchModel model);
|
||||||
|
MenuViewModel? Update(MenuSearchModel model);
|
||||||
|
MenuViewModel? Delete(MenuSearchModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using SushiBarContracts.SearchModels;
|
||||||
|
using SushiBarContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IPlaceStorage
|
||||||
|
{
|
||||||
|
List<PlaceViewModel> GetFullList();
|
||||||
|
List<PlaceViewModel> GetFilteredList(PlaceSearchModel model);
|
||||||
|
|
||||||
|
PlaceViewModel? GetElement(PlaceSearchModel model);
|
||||||
|
PlaceViewModel? Insert(PlaceSearchModel model);
|
||||||
|
PlaceViewModel? Update(PlaceSearchModel model);
|
||||||
|
PlaceViewModel? Delete(PlaceSearchModel model);
|
||||||
|
}
|
||||||
|
}
|
21
SushiBar/SushiBarContracts/StoragesContracts/ITaskStorage.cs
Normal file
21
SushiBar/SushiBarContracts/StoragesContracts/ITaskStorage.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using SushiBarContracts.SearchModels;
|
||||||
|
using SushiBarContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface ITaskStorage
|
||||||
|
{
|
||||||
|
List<TaskViewModel> GetFullList();
|
||||||
|
List<TaskViewModel> GetFilteredList(TaskSearchModel model);
|
||||||
|
|
||||||
|
TaskViewModel? GetElement(TaskSearchModel model);
|
||||||
|
TaskViewModel? Insert(TaskSearchModel model);
|
||||||
|
TaskViewModel? Update(TaskSearchModel model);
|
||||||
|
TaskViewModel? Delete(TaskSearchModel model);
|
||||||
|
}
|
||||||
|
}
|
13
SushiBar/SushiBarContracts/SushiBarContracts.csproj
Normal file
13
SushiBar/SushiBarContracts/SushiBarContracts.csproj
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\SushiBarDataModels\SushiBarDataModels.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
21
SushiBar/SushiBarContracts/ViewModels/BuyerViewModel.cs
Normal file
21
SushiBar/SushiBarContracts/ViewModels/BuyerViewModel.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using SushiBarDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class BuyerViewModel : IBuyerModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Имя покупателя")]
|
||||||
|
public string BuyerName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Статус")]
|
||||||
|
public DateTime? BuyerBirthDate { get; set; }
|
||||||
|
}
|
||||||
|
}
|
28
SushiBar/SushiBarContracts/ViewModels/CookViewModel.cs
Normal file
28
SushiBar/SushiBarContracts/ViewModels/CookViewModel.cs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
using SushiBarDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class CookViewModel : ICookModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Имя повара")]
|
||||||
|
public string CookName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Фамилия повара")]
|
||||||
|
public string CookSurname { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public int Experience { get; set; }
|
||||||
|
|
||||||
|
public string PhoneNumber { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string Passport { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
25
SushiBar/SushiBarContracts/ViewModels/MenuViewModel.cs
Normal file
25
SushiBar/SushiBarContracts/ViewModels/MenuViewModel.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
using SushiBarDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class MenuViewModel : IMenuModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Название блюда")]
|
||||||
|
public string FoodName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Описание блюда")]
|
||||||
|
public string Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[DisplayName("Цена")]
|
||||||
|
public double Price { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
18
SushiBar/SushiBarContracts/ViewModels/PlaceViewModel.cs
Normal file
18
SushiBar/SushiBarContracts/ViewModels/PlaceViewModel.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using SushiBarDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class PlaceViewModel : IPlaceModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public int PlaceNumber { get; set; }
|
||||||
|
|
||||||
|
public int CountPlaces { get; set; }
|
||||||
|
}
|
||||||
|
}
|
33
SushiBar/SushiBarContracts/ViewModels/TaskViewModel.cs
Normal file
33
SushiBar/SushiBarContracts/ViewModels/TaskViewModel.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
using SushiBarDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SushiBarContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class TaskViewModel : ITaskModel
|
||||||
|
{
|
||||||
|
[DisplayName("Номер")]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Дата заказа")]
|
||||||
|
public DateTime TaskDate { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Статус заказа")]
|
||||||
|
public SushiBarDataModels.Enum.TaskStatus Status { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("Сумма")]
|
||||||
|
public double FullPrice { get; set; }
|
||||||
|
|
||||||
|
public int PlaceId { get; set; }
|
||||||
|
|
||||||
|
public int CookId { get; set; }
|
||||||
|
|
||||||
|
public int BuyerId { get; set; }
|
||||||
|
|
||||||
|
public int MenuId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -10,5 +10,7 @@ namespace SushiBarDataModels.Models
|
|||||||
int PlaceId { get; }
|
int PlaceId { get; }
|
||||||
int CookId { get; }
|
int CookId { get; }
|
||||||
int BuyerId { get; }
|
int BuyerId { get; }
|
||||||
|
|
||||||
|
int MenuId { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user