Kharlamov A.A. Lab Work 01 #1

Closed
Kharlamov wants to merge 6 commits from LabWork_01 into main
7 changed files with 95 additions and 1 deletions
Showing only changes of commit f5462ca1f8 - Show all commits

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 AbstractFoodOrdersDataModels.Enums
{
public enum OrderStatus
{
Неизвестен = -1,
Принят = 0,
Выполняется = 1,
Готов = 2,
Выдан = 3
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AbstractFoodOrdersDataModels
{
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 AbstractFoodOrdersDataModels.Models
{
public interface IComponentModel : IId
{
string ComponentName { get; }
double Cost { get; }
}
}

View File

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

View File

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

View File

@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32901.215
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FoodOrders", "FoodOrders\FoodOrders.csproj", "{4DC7A9CF-C994-4010-B23B-F4DB4D964D1D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FoodOrders", "FoodOrders\FoodOrders.csproj", "{4DC7A9CF-C994-4010-B23B-F4DB4D964D1D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbstractFoodOrdersDataModels", "AbstractFoodOrdersDataModels\AbstractFoodOrdersDataModels.csproj", "{797093A6-6C7B-414E-874F-1BB48A6468C7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -15,6 +17,10 @@ Global
{4DC7A9CF-C994-4010-B23B-F4DB4D964D1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4DC7A9CF-C994-4010-B23B-F4DB4D964D1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4DC7A9CF-C994-4010-B23B-F4DB4D964D1D}.Release|Any CPU.Build.0 = Release|Any CPU
{797093A6-6C7B-414E-874F-1BB48A6468C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{797093A6-6C7B-414E-874F-1BB48A6468C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{797093A6-6C7B-414E-874F-1BB48A6468C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{797093A6-6C7B-414E-874F-1BB48A6468C7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE