Завершено создание моделей

This commit is contained in:
Сергей Полевой 2023-01-29 18:03:54 +04:00
parent 4baba29dae
commit 5bf198916e
7 changed files with 64 additions and 0 deletions

View File

@ -5,6 +5,8 @@ VisualStudioVersion = 17.3.32825.248
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlowerShop", "FlowerShop\FlowerShop.csproj", "{086CB019-AA3B-425A-87B0-26662D1F201F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlowerShopDataModels", "FlowerShopDataModels\FlowerShopDataModels.csproj", "{FDC31847-CB24-4EBD-8CE5-852ED404CEAE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -15,6 +17,10 @@ Global
{086CB019-AA3B-425A-87B0-26662D1F201F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{086CB019-AA3B-425A-87B0-26662D1F201F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{086CB019-AA3B-425A-87B0-26662D1F201F}.Release|Any CPU.Build.0 = Release|Any CPU
{FDC31847-CB24-4EBD-8CE5-852ED404CEAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FDC31847-CB24-4EBD-8CE5-852ED404CEAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDC31847-CB24-4EBD-8CE5-852ED404CEAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FDC31847-CB24-4EBD-8CE5-852ED404CEAE}.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,8 @@
namespace FlowerShopDataModels.Models
{
public interface IComponentModel : IId
{
string ComponentName { get; }
double Cost { get; }
}
}

View File

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

View File

@ -0,0 +1,14 @@
using FlowerShopDataModels.Enums;
namespace FlowerShopDataModels.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,9 @@
namespace FlowerShopDataModels.Models
{
public interface IProductModel : IId
{
string ProductName { get; }
double Price { get; }
Dictionary<int, (IComponentModel, int)> ProductComponents { get; }
}
}

View File

@ -0,0 +1,11 @@
namespace FlowerShopDataModels.Enums
{
public enum OrderStatus
{
Unknown = -1,
Accepted = 0,
Processing = 1,
Ready = 2,
Issued = 3
}
}