models layer
This commit is contained in:
parent
4cc070ce87
commit
afbff953c2
17
Pizzeria/PizzeriaDataModels/Enums/OrderStatus.cs
Normal file
17
Pizzeria/PizzeriaDataModels/Enums/OrderStatus.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PizzeriaDataModels
|
||||
{
|
||||
public enum OrderStatus
|
||||
{
|
||||
Неизвестен = -1,
|
||||
Принят = 0,
|
||||
Выполняется = 1,
|
||||
Готов = 2,
|
||||
Выдан = 3
|
||||
}
|
||||
}
|
13
Pizzeria/PizzeriaDataModels/IId.cs
Normal file
13
Pizzeria/PizzeriaDataModels/IId.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PizzeriaDataModels
|
||||
{
|
||||
public interface IId
|
||||
{
|
||||
int Id { get; }
|
||||
}
|
||||
}
|
14
Pizzeria/PizzeriaDataModels/Models/IComponentModel.cs
Normal file
14
Pizzeria/PizzeriaDataModels/Models/IComponentModel.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PizzeriaDataModels
|
||||
{
|
||||
public interface IComponentModel : IId
|
||||
{
|
||||
string ComponentName { get; }
|
||||
double Cost { get; }
|
||||
}
|
||||
}
|
19
Pizzeria/PizzeriaDataModels/Models/IOrderModel.cs
Normal file
19
Pizzeria/PizzeriaDataModels/Models/IOrderModel.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using PizzeriaDataModels;
|
||||
|
||||
namespace PizzeriaDataModels
|
||||
{
|
||||
public interface IOrderModel : IId
|
||||
{
|
||||
int PizzaId { get; }
|
||||
int Count { get; }
|
||||
double Sum { get; }
|
||||
OrderStatus Status { get; }
|
||||
DateTime DateCreate { get; }
|
||||
DateTime? DateImplement { get; }
|
||||
}
|
||||
}
|
16
Pizzeria/PizzeriaDataModels/Models/IPizzaModel.cs
Normal file
16
Pizzeria/PizzeriaDataModels/Models/IPizzaModel.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PizzeriaDataModels
|
||||
{
|
||||
public interface IPizzaModel : IId
|
||||
{
|
||||
string PizzaName { get; }
|
||||
double Price { get; }
|
||||
Dictionary<int, (IComponentModel, int)> PizzaComponents { get; }
|
||||
|
||||
}
|
||||
}
|
9
Pizzeria/PizzeriaDataModels/PizzeriaDataModels.csproj
Normal file
9
Pizzeria/PizzeriaDataModels/PizzeriaDataModels.csproj
Normal file
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user