add models

This commit is contained in:
Alina Batylkina 2023-04-06 14:29:23 +04:00
parent be1228f7c8
commit 618c41a5a0
13 changed files with 215 additions and 0 deletions

25
Canteen/Canteen.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33403.182
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CanteenDataModels", "CanteenDataModels\CanteenDataModels.csproj", "{F11EA5AA-83D7-4D06-9DC5-E2C8E726BC4A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F11EA5AA-83D7-4D06-9DC5-E2C8E726BC4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F11EA5AA-83D7-4D06-9DC5-E2C8E726BC4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F11EA5AA-83D7-4D06-9DC5-E2C8E726BC4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F11EA5AA-83D7-4D06-9DC5-E2C8E726BC4A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {939F96DE-61BC-438B-9904-E07CEC3136CB}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Folder Include="Enums\" />
<Folder Include="Models\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CanteenDataModels.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 CanteenDataModels
{
public interface IId
{
int Id { get; }
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CanteenDataModels.Models
{
public interface ICookModel : IId
{
string Name { get; }
string Surname { get; }
string? Patronymic { get; }
DateTime DateOfBirth { get; }
string Position { get; }
int ClientId { get; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CanteenDataModels.Models
{
public interface IDishModel : IId
{
string DishName { get; }
double Cost { get; }
int VisitorId { get; }
int ProductId { get; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CanteenDataModels.Models
{
public interface ILunchModel : IId
{
string LunchName { get; }
double Cost { get; }
int VisitorId { get; }
Dictionary<int, (IProductModel, int)> LunchProducts { get; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CanteenDataModels.Models
{
public interface IManagerModel : IId
{
string FIO { get; }
string Login { get; }
string Password { get; }
string PhoneNumber { get; }
int RoleId { get; }
}
}

View File

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

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CanteenDataModels.Models
{
public interface IProductModel : IId
{
string ProductName { get; }
double Cost { get; }
int ClientId { get; }
Dictionary<int, ICookModel> ProductCooks { get; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CanteenDataModels.Models
{
public interface IRoleModel : IId
{
string RoleName { get; }
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CanteenDataModels.Models
{
public interface ITablewareModel : IId
{
string TablewareName { get; }
int ClientId { get; }
int OrderId { get; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CanteenDataModels.Models
{
public interface IVisitorModel : IId
{
string FIO { get; }
string Login { get; }
string Password { get; }
string PhoneNumber { get; }
int RoleId { get; }
}
}