Добавлена библиотека SushiBarModels

This commit is contained in:
ekallin 2024-02-25 19:28:02 +04:00
parent d86ff794e0
commit 62aa143ea2
7 changed files with 64 additions and 0 deletions

View File

@ -5,6 +5,8 @@ VisualStudioVersion = 17.8.34525.116
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SushiBar", "SushiBar.csproj", "{E1025CC0-5650-4509-93C8-BF4FA2D506E0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SushiBarDataModels", "..\SushiBarDataModels\SushiBarDataModels.csproj", "{98946D8E-A8FC-40DC-9FC8-BCBBC6BD6688}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -15,6 +17,10 @@ Global
{E1025CC0-5650-4509-93C8-BF4FA2D506E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E1025CC0-5650-4509-93C8-BF4FA2D506E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E1025CC0-5650-4509-93C8-BF4FA2D506E0}.Release|Any CPU.Build.0 = Release|Any CPU
{98946D8E-A8FC-40DC-9FC8-BCBBC6BD6688}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{98946D8E-A8FC-40DC-9FC8-BCBBC6BD6688}.Debug|Any CPU.Build.0 = Debug|Any CPU
{98946D8E-A8FC-40DC-9FC8-BCBBC6BD6688}.Release|Any CPU.ActiveCfg = Release|Any CPU
{98946D8E-A8FC-40DC-9FC8-BCBBC6BD6688}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -0,0 +1,8 @@
namespace SushiBarDataModels.Models
{
public interface IComponentModel
{
string ComponentName { get; }
double Cost { get; }
}
}

View File

@ -0,0 +1,7 @@
namespace SushiBarDataModels
{
public interface IId
{
int Id { get; }
}
}

View File

@ -0,0 +1,14 @@
using SushiBarDataModels.Enums;
namespace SushiBarDataModels
{
public interface IOrderModel : IId
{
int SushiId { get; }
int Count { get; }
double Sum { get; }
OrderStatus Status { get; }
DateTime DateCreate { get; }
DateTime? DateImplement { get; }
}
}

View File

@ -0,0 +1,9 @@
namespace SushiBarDataModels.Models
{
public interface ISushiModel : IId
{
string SushiName { get; }
double Price { get; }
Dictionary<int, (IComponentModel, int)> SushiComponents { get; }
}
}

View File

@ -0,0 +1,11 @@
namespace SushiBarDataModels.Enums
{
public enum OrderStatus
{
Неизвестен = -1,
Принят = 0,
Выполняется = 1,
Готов = 2,
Выдан = 3
}
}

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>