Интерфейсы

This commit is contained in:
Данила 2023-03-16 18:15:44 +04:00
parent fae4b9fbc2
commit 00da4cabbe
7 changed files with 93 additions and 0 deletions

View File

@ -5,6 +5,8 @@ VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbstractFoodOrdersView", "AbstractFoodOrdersView\AbstractFoodOrdersView.csproj", "{831CD419-7329-4082-9B2F-9EA0EE2EA4AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbstractFoodOrdersDataModel", "AbstractFoodOrdersDataModel\AbstractFoodOrdersDataModel.csproj", "{FC864A68-E5FF-4015-A4B3-85B7CDD584FE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -15,6 +17,10 @@ Global
{831CD419-7329-4082-9B2F-9EA0EE2EA4AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{831CD419-7329-4082-9B2F-9EA0EE2EA4AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{831CD419-7329-4082-9B2F-9EA0EE2EA4AC}.Release|Any CPU.Build.0 = Release|Any CPU
{FC864A68-E5FF-4015-A4B3-85B7CDD584FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FC864A68-E5FF-4015-A4B3-85B7CDD584FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FC864A68-E5FF-4015-A4B3-85B7CDD584FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FC864A68-E5FF-4015-A4B3-85B7CDD584FE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

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

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AbstractFoodOrdersDataModel.Enums
{
public enum OrderStatus
{
Неизвестен = -1,
Принят = 0,
Выполняется = 2,
Готов = 3,
Выдан = 3
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AbstractFoodOrdersDataModel
{
public interface IId
{
int Id { get; }
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AbstractFoodOrdersDataModel.Models
{
public interface IComponentModel : IId
{
string ComponentName { get;}
double Cost { get; }
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AbstractFoodOrdersDataModel.Models
{
public interface IFoodModel : IId
{
string FoodName { get; }
double Price { get; }
Dictionary<int, (IComponentModel, int)> FoodComponents { get; }
}
}

View File

@ -0,0 +1,19 @@
using AbstractFoodOrdersDataModel.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AbstractFoodOrdersDataModel.Models
{
public interface IOrderModel : IId
{
int ProductId { get; }
int Count { get; }
double Sum { get; }
OrderStatus Status { get; }
DateTime DateCreate { get; }
DateTime? DateImplement { get; }
}
}