Создание модели данных
This commit is contained in:
parent
bd08d5cb09
commit
1847bc0b01
@ -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
|
||||||
|
16
Hotel/HotelDataModels/Enums/AcceptanceStatus.cs
Normal file
16
Hotel/HotelDataModels/Enums/AcceptanceStatus.cs
Normal 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
|
||||||
|
}
|
||||||
|
}
|
9
Hotel/HotelDataModels/HotelDataModels.csproj
Normal file
9
Hotel/HotelDataModels/HotelDataModels.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>
|
13
Hotel/HotelDataModels/IId.cs
Normal file
13
Hotel/HotelDataModels/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 HotelDataModels
|
||||||
|
{
|
||||||
|
public interface IId
|
||||||
|
{
|
||||||
|
int Id { get; }
|
||||||
|
}
|
||||||
|
}
|
18
Hotel/HotelDataModels/Models/IBooking.cs
Normal file
18
Hotel/HotelDataModels/Models/IBooking.cs
Normal 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; }
|
||||||
|
}
|
||||||
|
}
|
17
Hotel/HotelDataModels/Models/IClient.cs
Normal file
17
Hotel/HotelDataModels/Models/IClient.cs
Normal 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; }
|
||||||
|
}
|
||||||
|
}
|
13
Hotel/HotelDataModels/Models/IPost.cs
Normal file
13
Hotel/HotelDataModels/Models/IPost.cs
Normal 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; }
|
||||||
|
}
|
||||||
|
}
|
18
Hotel/HotelDataModels/Models/IRoom.cs
Normal file
18
Hotel/HotelDataModels/Models/IRoom.cs
Normal 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; }
|
||||||
|
}
|
||||||
|
}
|
21
Hotel/HotelDataModels/Models/IWorker.cs
Normal file
21
Hotel/HotelDataModels/Models/IWorker.cs
Normal 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; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user