Слой моделей

This commit is contained in:
Максим Яковлев 2024-03-26 18:58:14 +04:00
parent 00deb82d03
commit 2063f7c4d8
11 changed files with 175 additions and 0 deletions

31
SushiBar/SushiBar.sln Normal file
View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34714.143
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SushiBarView", "SushiBar\SushiBarView.csproj", "{2B4A5A98-6D06-4461-8D41-363CED12B9C2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SushiBarDataModels", "SushiBarDataModels\SushiBarDataModels.csproj", "{C373ED9F-747E-47D0-9B7C-B65E062CD537}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2B4A5A98-6D06-4461-8D41-363CED12B9C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B4A5A98-6D06-4461-8D41-363CED12B9C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B4A5A98-6D06-4461-8D41-363CED12B9C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B4A5A98-6D06-4461-8D41-363CED12B9C2}.Release|Any CPU.Build.0 = Release|Any CPU
{C373ED9F-747E-47D0-9B7C-B65E062CD537}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C373ED9F-747E-47D0-9B7C-B65E062CD537}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C373ED9F-747E-47D0-9B7C-B65E062CD537}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C373ED9F-747E-47D0-9B7C-B65E062CD537}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {86A1AF32-AD3E-4D5E-B57B-4AE61FD58DF7}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,17 @@
namespace SushiBar
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new Form1());
}
}
}

View File

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,16 @@

namespace SushiBarDataModels.Enum
{
public enum TaskStatus
{
Неизвестен = -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 SushiBarDataModels
{
public interface IId
{
int Id { get; }
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SushiBarDataModels.Models
{
public interface IBuyerModel : IId
{
string BuyerName { get; }
DateTime? BuyerBirthDate { get; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SushiBarDataModels.Models
{
public interface ICookModel : IId
{
string CookName { get; }
string CookSurname { get; }
int Experience { get; }
string PhoneNumber { get; }
string Passport { get; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SushiBarDataModels.Models
{
public interface IMenuModel : IId
{
string FoodName { get; }
string Description { get; }
double Price { get; }
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SushiBarDataModels.Models
{
public interface IPlaceModel : IId
{
int PlaceNumber { get; }
int CountPlaces { get; }
}
}

View File

@ -0,0 +1,14 @@
using SushiBarDataModels.Enum;
namespace SushiBarDataModels.Models
{
public interface ITaskModel : IId
{
DateTime TaskDate { get; }
Enum.TaskStatus Status { get; }
double FullPrice { get; }
int PlaceId { get; }
int CookId { get; }
int BuyerId { get; }
}
}

View File

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