Создание модели данных

This commit is contained in:
Extrimal 2024-04-10 13:25:57 +04:00
parent bd08d5cb09
commit 1847bc0b01
9 changed files with 131 additions and 0 deletions

View File

@ -5,6 +5,8 @@ VisualStudioVersion = 17.9.34622.214
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HotelView", "HotelView\HotelView.csproj", "{BEF2955E-B161-42D6-9385-D06D31FA5CF8}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HotelView", "HotelView\HotelView.csproj", "{BEF2955E-B161-42D6-9385-D06D31FA5CF8}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HotelDataModels", "HotelDataModels\HotelDataModels.csproj", "{311319D0-3CD8-48F0-8258-017FBD83728D}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -15,6 +17,10 @@ Global
{BEF2955E-B161-42D6-9385-D06D31FA5CF8}.Debug|Any CPU.Build.0 = Debug|Any CPU {BEF2955E-B161-42D6-9385-D06D31FA5CF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BEF2955E-B161-42D6-9385-D06D31FA5CF8}.Release|Any CPU.ActiveCfg = Release|Any CPU {BEF2955E-B161-42D6-9385-D06D31FA5CF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BEF2955E-B161-42D6-9385-D06D31FA5CF8}.Release|Any CPU.Build.0 = Release|Any CPU {BEF2955E-B161-42D6-9385-D06D31FA5CF8}.Release|Any CPU.Build.0 = Release|Any CPU
{311319D0-3CD8-48F0-8258-017FBD83728D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{311319D0-3CD8-48F0-8258-017FBD83728D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{311319D0-3CD8-48F0-8258-017FBD83728D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{311319D0-3CD8-48F0-8258-017FBD83728D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HotelDataModels.Enums
{
public enum AcceptanceStatus
{
Неизвестен = -1,
Получин = 0,
Принимается = 1,
Принят = 2
}
}

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,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HotelDataModels
{
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 HotelDataModels.Models
{
public interface IBooking : IId
{
int RoomId { get; }
int ClientId { get; }
DateTime ArrivalDate { get; }
DateTime DepartureDate { get; }
int NumberHoursSpent { get; }
int TotalCost { get; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HotelDataModels.Models
{
public interface IClient : IId
{
string Name { get; }
string Surname { get; }
DateOnly DateOfBirth { get; }
string PhoneNumber { get; }
}
}

View File

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

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HotelDataModels.Models
{
public interface IRoom : IId
{
int MaidId { get; }
int Number { get; }
int Floor { get; }
int NumberOfBeds { get; }
string Condition { get; }
int Cost { get; }
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HotelDataModels.Models
{
public interface IWorker : IId
{
int PostId { get; }
string Surname { get; }
string Name { get; }
string Patronymic { get; }
DateOnly DateOfBirth { get; }
int WorkExperience { get; }
int Salary { get; }
string Phone { get; }
}
}