From afbff953c2a1ce03b242d709deaec910fd616831 Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Mon, 13 Feb 2023 19:41:10 +0300 Subject: [PATCH] models layer --- .../PizzeriaDataModels/Enums/OrderStatus.cs | 17 +++++++++++++++++ Pizzeria/PizzeriaDataModels/IId.cs | 13 +++++++++++++ .../Models/IComponentModel.cs | 14 ++++++++++++++ .../PizzeriaDataModels/Models/IOrderModel.cs | 19 +++++++++++++++++++ .../PizzeriaDataModels/Models/IPizzaModel.cs | 16 ++++++++++++++++ .../PizzeriaDataModels.csproj | 9 +++++++++ 6 files changed, 88 insertions(+) create mode 100644 Pizzeria/PizzeriaDataModels/Enums/OrderStatus.cs create mode 100644 Pizzeria/PizzeriaDataModels/IId.cs create mode 100644 Pizzeria/PizzeriaDataModels/Models/IComponentModel.cs create mode 100644 Pizzeria/PizzeriaDataModels/Models/IOrderModel.cs create mode 100644 Pizzeria/PizzeriaDataModels/Models/IPizzaModel.cs create mode 100644 Pizzeria/PizzeriaDataModels/PizzeriaDataModels.csproj diff --git a/Pizzeria/PizzeriaDataModels/Enums/OrderStatus.cs b/Pizzeria/PizzeriaDataModels/Enums/OrderStatus.cs new file mode 100644 index 0000000..99b3e51 --- /dev/null +++ b/Pizzeria/PizzeriaDataModels/Enums/OrderStatus.cs @@ -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 + } +} diff --git a/Pizzeria/PizzeriaDataModels/IId.cs b/Pizzeria/PizzeriaDataModels/IId.cs new file mode 100644 index 0000000..f7e3b49 --- /dev/null +++ b/Pizzeria/PizzeriaDataModels/IId.cs @@ -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; } + } +} diff --git a/Pizzeria/PizzeriaDataModels/Models/IComponentModel.cs b/Pizzeria/PizzeriaDataModels/Models/IComponentModel.cs new file mode 100644 index 0000000..f228150 --- /dev/null +++ b/Pizzeria/PizzeriaDataModels/Models/IComponentModel.cs @@ -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; } + } +} diff --git a/Pizzeria/PizzeriaDataModels/Models/IOrderModel.cs b/Pizzeria/PizzeriaDataModels/Models/IOrderModel.cs new file mode 100644 index 0000000..56e0e90 --- /dev/null +++ b/Pizzeria/PizzeriaDataModels/Models/IOrderModel.cs @@ -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; } + } +} diff --git a/Pizzeria/PizzeriaDataModels/Models/IPizzaModel.cs b/Pizzeria/PizzeriaDataModels/Models/IPizzaModel.cs new file mode 100644 index 0000000..ae8354c --- /dev/null +++ b/Pizzeria/PizzeriaDataModels/Models/IPizzaModel.cs @@ -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 PizzaComponents { get; } + + } +} diff --git a/Pizzeria/PizzeriaDataModels/PizzeriaDataModels.csproj b/Pizzeria/PizzeriaDataModels/PizzeriaDataModels.csproj new file mode 100644 index 0000000..132c02c --- /dev/null +++ b/Pizzeria/PizzeriaDataModels/PizzeriaDataModels.csproj @@ -0,0 +1,9 @@ + + + + net6.0 + enable + enable + + +