DataModels + Contracts
This commit is contained in:
parent
3734a7b47a
commit
ccbd9b2a7f
31
TravelAgency/TravelAgency.sln
Normal file
31
TravelAgency/TravelAgency.sln
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.3.32929.385
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TravelAgencyDataModels", "TravelAgencyDataModels\TravelAgencyDataModels.csproj", "{9C824913-01A0-456C-AD55-F47471596EAD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TravelAgencyContracts", "TravelAgencyContracts\TravelAgencyContracts.csproj", "{5A5C7696-4047-4BB8-BEC3-9DDB4000394E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{9C824913-01A0-456C-AD55-F47471596EAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9C824913-01A0-456C-AD55-F47471596EAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9C824913-01A0-456C-AD55-F47471596EAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9C824913-01A0-456C-AD55-F47471596EAD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5A5C7696-4047-4BB8-BEC3-9DDB4000394E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5A5C7696-4047-4BB8-BEC3-9DDB4000394E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5A5C7696-4047-4BB8-BEC3-9DDB4000394E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5A5C7696-4047-4BB8-BEC3-9DDB4000394E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {81490F8B-CB51-4068-B047-669976522A07}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -0,0 +1,19 @@
|
||||
using TravelAgencyDataModels.Models;
|
||||
|
||||
namespace TravelAgencyContracts.BindingModels
|
||||
{
|
||||
public class ExcursionBindingModel : IExcursionModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string ExcursionName { get; set; } = string.Empty;
|
||||
|
||||
public string ExcursionDescription { get; set; } = string.Empty;
|
||||
|
||||
public double Price { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
|
||||
public Dictionary<int, ITourModel> ExcursionTours { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using TravelAgencyDataModels.Models;
|
||||
|
||||
namespace TravelAgencyContracts.BindingModels
|
||||
{
|
||||
public class ExcursionGroupBindingModel : IExcursionGroupModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string ExcursionGroupName { get; set; } = string.Empty;
|
||||
|
||||
public int ParticipantsAmount { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
|
||||
public int GuideId { get; set; }
|
||||
|
||||
public Dictionary<int, ITourModel> ExcursionGroupTours { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using TravelAgencyDataModels.Models;
|
||||
|
||||
namespace TravelAgencyContracts.BindingModels
|
||||
{
|
||||
public class GuideBindingModel : IGuideModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string GuideFIO { get; set; } = string.Empty;
|
||||
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
public string PhoneNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using TravelAgencyDataModels.Models;
|
||||
|
||||
namespace TravelAgencyContracts.BindingModels
|
||||
{
|
||||
public class PlaceBindingModel : IPlaceModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string PlaceName { get; set; } = string.Empty;
|
||||
|
||||
public string PlaceAddress { get; set; } = string.Empty;
|
||||
|
||||
public int ExcursionId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using TravelAgencyDataModels.Models;
|
||||
|
||||
namespace TravelAgencyContracts.BindingModels
|
||||
{
|
||||
public class TourBindingModel : ITourModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string TourName { get; set; } = string.Empty;
|
||||
|
||||
public string TourDescription { get; set; } = string.Empty;
|
||||
|
||||
public double Price { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using TravelAgencyDataModels.Models;
|
||||
|
||||
namespace TravelAgencyContracts.BindingModels
|
||||
{
|
||||
public class TripBindingModel : ITripModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string TripName { get; set; } = string.Empty;
|
||||
|
||||
public DateTime TripDate { get; set; }
|
||||
|
||||
public int GuideId { get; set; }
|
||||
|
||||
public Dictionary<int, IPlaceModel> TripPlaces { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using TravelAgencyDataModels.Models;
|
||||
|
||||
namespace TravelAgencyContracts.BindingModels
|
||||
{
|
||||
public class UserBindingModel : IUserModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string UserFIO { get; set; } = string.Empty;
|
||||
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
public string PhoneNumber { get; set; } = string.Empty;
|
||||
|
||||
public string Login { get; set; } = string.Empty;
|
||||
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.BusinessLogicsContracts
|
||||
{
|
||||
public interface IExcursionGroupLogic
|
||||
{
|
||||
List<ExcursionGroupViewModel>? ReadList(ExcursionGroupSearchModel? model);
|
||||
|
||||
ExcursionGroupViewModel? ReadElement(ExcursionGroupSearchModel model);
|
||||
|
||||
bool Create(ExcursionGroupBindingModel model);
|
||||
|
||||
bool Update(ExcursionGroupBindingModel model);
|
||||
|
||||
bool Delete(ExcursionGroupBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.BusinessLogicsContracts
|
||||
{
|
||||
public interface IExcursionLogic
|
||||
{
|
||||
List<ExcursionViewModel>? ReadList(ExcursionSearchModel? model);
|
||||
|
||||
ExcursionViewModel? ReadElement(ExcursionSearchModel model);
|
||||
|
||||
bool Create(ExcursionBindingModel model);
|
||||
|
||||
bool Update(ExcursionBindingModel model);
|
||||
|
||||
bool Delete(ExcursionBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.BusinessLogicsContracts
|
||||
{
|
||||
public interface IGuideLogic
|
||||
{
|
||||
List<GuideViewModel>? ReadList(GuideSearchModel? model);
|
||||
|
||||
GuideViewModel? ReadElement(GuideSearchModel model);
|
||||
|
||||
bool Create(GuideBindingModel model);
|
||||
|
||||
bool Update(GuideBindingModel model);
|
||||
|
||||
bool Delete(GuideBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.BusinessLogicsContracts
|
||||
{
|
||||
public interface IPlaceLogic
|
||||
{
|
||||
List<PlaceViewModel>? ReadList(PlaceSearchModel? model);
|
||||
|
||||
PlaceViewModel? ReadElement(PlaceSearchModel model);
|
||||
|
||||
bool Create(PlaceBindingModel model);
|
||||
|
||||
bool Update(PlaceBindingModel model);
|
||||
|
||||
bool Delete(PlaceBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.BusinessLogicsContracts
|
||||
{
|
||||
public interface ITourLogic
|
||||
{
|
||||
List<TourViewModel>? ReadList(TourSearchModel? model);
|
||||
|
||||
TourViewModel? ReadElement(TourSearchModel model);
|
||||
|
||||
bool Create(TourBindingModel model);
|
||||
|
||||
bool Update(TourBindingModel model);
|
||||
|
||||
bool Delete(TourBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.BusinessLogicsContracts
|
||||
{
|
||||
public interface ITripLogic
|
||||
{
|
||||
List<TripViewModel>? ReadList(TripSearchModel? model);
|
||||
|
||||
TripViewModel? ReadElement(TripSearchModel model);
|
||||
|
||||
bool Create(TripBindingModel model);
|
||||
|
||||
bool Update(TripBindingModel model);
|
||||
|
||||
bool Delete(TripBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.BusinessLogicsContracts
|
||||
{
|
||||
public interface IUserLogic
|
||||
{
|
||||
List<UserViewModel>? ReadList(UserSearchModel? model);
|
||||
|
||||
UserViewModel? ReadElement(UserSearchModel model);
|
||||
|
||||
bool Create(UserBindingModel model);
|
||||
|
||||
bool Update(UserBindingModel model);
|
||||
|
||||
bool Delete(UserBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
namespace TravelAgencyContracts.SearchModels
|
||||
{
|
||||
public class ExcursionGroupSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public string? ExcursionGroupName { get; set; }
|
||||
|
||||
public int? UserId { get; set; }
|
||||
|
||||
public int? GuideId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
namespace TravelAgencyContracts.SearchModels
|
||||
{
|
||||
public class ExcursionSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public string? ExcursionName { get; set; }
|
||||
|
||||
public int? UserId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
namespace TravelAgencyContracts.SearchModels
|
||||
{
|
||||
public class GuideSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public string? GuideFIO { get; set; }
|
||||
|
||||
public string? Email { get; set; }
|
||||
|
||||
public string? PhoneNumber { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
namespace TravelAgencyContracts.SearchModels
|
||||
{
|
||||
public class PlaceSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public string? PlaceName { get; set; }
|
||||
|
||||
public string? PlaceAddress { get; set; }
|
||||
|
||||
public int? ExcursionId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
namespace TravelAgencyContracts.SearchModels
|
||||
{
|
||||
public class TourSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public string? TourName { get; set; }
|
||||
|
||||
public int? UserId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
namespace TravelAgencyContracts.SearchModels
|
||||
{
|
||||
public class TripSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public string? TripName { get; set; }
|
||||
|
||||
public DateTime? DateTrip { get; set; }
|
||||
|
||||
public int? GuideId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
namespace TravelAgencyContracts.SearchModels
|
||||
{
|
||||
public class UserSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public string? UserFIO { get; set; }
|
||||
|
||||
public string? Email { get; set; }
|
||||
|
||||
public string? PhoneNumber { get; set; }
|
||||
|
||||
public string? Login { get; set; }
|
||||
|
||||
public string? Password { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.StoragesContracts
|
||||
{
|
||||
public interface IExcursionGroupStorage
|
||||
{
|
||||
List<ExcursionGroupViewModel> GetFullList();
|
||||
|
||||
List<ExcursionGroupViewModel> GetFilteredList(ExcursionGroupSearchModel model);
|
||||
|
||||
ExcursionGroupViewModel? GetElement(ExcursionGroupSearchModel model);
|
||||
|
||||
ExcursionGroupViewModel? Insert(ExcursionGroupBindingModel model);
|
||||
|
||||
ExcursionGroupViewModel? Update(ExcursionGroupBindingModel model);
|
||||
|
||||
ExcursionGroupViewModel? Delete(ExcursionGroupBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.StoragesContracts
|
||||
{
|
||||
public interface IExcursionStorage
|
||||
{
|
||||
List<ExcursionViewModel> GetFullList();
|
||||
|
||||
List<ExcursionViewModel> GetFilteredList(ExcursionSearchModel model);
|
||||
|
||||
ExcursionViewModel? GetElement(ExcursionSearchModel model);
|
||||
|
||||
ExcursionViewModel? Insert(ExcursionBindingModel model);
|
||||
|
||||
ExcursionViewModel? Update(ExcursionBindingModel model);
|
||||
|
||||
ExcursionViewModel? Delete(ExcursionBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.StoragesContracts
|
||||
{
|
||||
public interface IGuideStorage
|
||||
{
|
||||
List<GuideViewModel> GetFullList();
|
||||
|
||||
List<GuideViewModel> GetFilteredList(GuideSearchModel model);
|
||||
|
||||
GuideViewModel? GetElement(GuideSearchModel model);
|
||||
|
||||
GuideViewModel? Insert(GuideBindingModel model);
|
||||
|
||||
GuideViewModel? Update(GuideBindingModel model);
|
||||
|
||||
GuideViewModel? Delete(GuideBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.StoragesContracts
|
||||
{
|
||||
public interface IPlaceStorage
|
||||
{
|
||||
List<PlaceViewModel> GetFullList();
|
||||
|
||||
List<PlaceViewModel> GetFilteredList(PlaceSearchModel model);
|
||||
|
||||
PlaceViewModel? GetElement(PlaceSearchModel model);
|
||||
|
||||
PlaceViewModel? Insert(PlaceBindingModel model);
|
||||
|
||||
PlaceViewModel? Update(PlaceBindingModel model);
|
||||
|
||||
PlaceViewModel? Delete(PlaceBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.StoragesContracts
|
||||
{
|
||||
public interface ITourStorage
|
||||
{
|
||||
List<TourViewModel> GetFullList();
|
||||
|
||||
List<TourViewModel> GetFilteredList(TourSearchModel model);
|
||||
|
||||
TourViewModel? GetElement(TourSearchModel model);
|
||||
|
||||
TourViewModel? Insert(TourBindingModel model);
|
||||
|
||||
TourViewModel? Update(TourBindingModel model);
|
||||
|
||||
TourViewModel? Delete(TourBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.StoragesContracts
|
||||
{
|
||||
public interface ITripStorage
|
||||
{
|
||||
List<TripViewModel> GetFullList();
|
||||
|
||||
List<TripViewModel> GetFilteredList(TripSearchModel model);
|
||||
|
||||
TripViewModel? GetElement(TripSearchModel model);
|
||||
|
||||
TripViewModel? Insert(TripBindingModel model);
|
||||
|
||||
TripViewModel? Update(TripBindingModel model);
|
||||
|
||||
TripViewModel? Delete(TripBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using TravelAgencyContracts.BindingModels;
|
||||
using TravelAgencyContracts.SearchModels;
|
||||
using TravelAgencyContracts.ViewModels;
|
||||
|
||||
namespace TravelAgencyContracts.StoragesContracts
|
||||
{
|
||||
public interface IUserStorage
|
||||
{
|
||||
List<UserViewModel> GetFullList();
|
||||
|
||||
List<UserViewModel> GetFilteredList(UserSearchModel model);
|
||||
|
||||
UserViewModel? GetElement(UserSearchModel model);
|
||||
|
||||
UserViewModel? Insert(UserBindingModel model);
|
||||
|
||||
UserViewModel? Update(UserBindingModel model);
|
||||
|
||||
UserViewModel? Delete(UserBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\TravelAgencyDataModels\TravelAgencyDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,22 @@
|
||||
using System.ComponentModel;
|
||||
using TravelAgencyDataModels.Models;
|
||||
|
||||
namespace TravelAgencyContracts.ViewModels
|
||||
{
|
||||
public class ExcursionGroupViewModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[DisplayName("Название экскурсии")]
|
||||
public string ExcursionGroupName { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Количество участников")]
|
||||
public int ParticipantsAmount { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
|
||||
public int GuideId { get; set; }
|
||||
|
||||
public Dictionary<int, ITourModel> ExcursionGroupTours { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
using System.ComponentModel;
|
||||
using TravelAgencyDataModels.Models;
|
||||
|
||||
namespace TravelAgencyContracts.ViewModels
|
||||
{
|
||||
public class ExcursionViewModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[DisplayName("Название экскурсии")]
|
||||
public string ExcursionName { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Описание экскурсии")]
|
||||
public string ExcursionDescription { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Цена")]
|
||||
public double Price { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
|
||||
public Dictionary<int, ITourModel> ExcursionTours { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace TravelAgencyContracts.ViewModels
|
||||
{
|
||||
public class GuideViewModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[DisplayName("ФИО гида")]
|
||||
public string GuideFIO { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Эл. почта")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Номер телефона")]
|
||||
public string PhoneNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace TravelAgencyContracts.ViewModels
|
||||
{
|
||||
public class PlaceViewModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[DisplayName("Название места")]
|
||||
public string PlaceName { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Адрес места")]
|
||||
public string PlaceAddress { get; set; } = string.Empty;
|
||||
|
||||
public int ExcursionId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace TravelAgencyContracts.ViewModels
|
||||
{
|
||||
public class TourViewModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[DisplayName("Название тура")]
|
||||
public string TourName { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Описание тура")]
|
||||
public string TourDescription { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Цена")]
|
||||
public double Price { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using System.ComponentModel;
|
||||
using TravelAgencyDataModels.Models;
|
||||
|
||||
namespace TravelAgencyContracts.ViewModels
|
||||
{
|
||||
public class TripViewModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[DisplayName("Название поездки")]
|
||||
public string TripName { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Дата поездки")]
|
||||
public DateTime TripDate { get; set; }
|
||||
|
||||
public int GuideId { get; set; }
|
||||
|
||||
public Dictionary<int, IPlaceModel> TripPlaces { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace TravelAgencyContracts.ViewModels
|
||||
{
|
||||
public class UserViewModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[DisplayName("ФИО пользователя")]
|
||||
public string UserFIO { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Эл. почта")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Номер телефона")]
|
||||
public string PhoneNumber { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Логин")]
|
||||
public string Login { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Пароль")]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
7
TravelAgency/TravelAgencyDataModels/IId.cs
Normal file
7
TravelAgency/TravelAgencyDataModels/IId.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace TravelAgencyDataModels
|
||||
{
|
||||
public interface IId
|
||||
{
|
||||
int Id { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace TravelAgencyDataModels.Models
|
||||
{
|
||||
public interface IExcursionGroupModel : IId
|
||||
{
|
||||
string ExcursionGroupName { get; }
|
||||
|
||||
int ParticipantsAmount { get; }
|
||||
|
||||
int UserId { get; }
|
||||
|
||||
int GuideId { get; }
|
||||
|
||||
Dictionary<int, ITourModel> ExcursionGroupTours { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace TravelAgencyDataModels.Models
|
||||
{
|
||||
public interface IExcursionModel : IId
|
||||
{
|
||||
string ExcursionName { get; }
|
||||
|
||||
string ExcursionDescription { get; }
|
||||
|
||||
double Price { get; }
|
||||
|
||||
int UserId { get; }
|
||||
|
||||
Dictionary<int, ITourModel> ExcursionTours { get; }
|
||||
}
|
||||
}
|
17
TravelAgency/TravelAgencyDataModels/Models/IGuideModel.cs
Normal file
17
TravelAgency/TravelAgencyDataModels/Models/IGuideModel.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TravelAgencyDataModels.Models
|
||||
{
|
||||
public interface IGuideModel :IId
|
||||
{
|
||||
string GuideFIO { get; }
|
||||
|
||||
string Email { get; }
|
||||
|
||||
string PhoneNumber { get; }
|
||||
}
|
||||
}
|
11
TravelAgency/TravelAgencyDataModels/Models/IPlaceModel.cs
Normal file
11
TravelAgency/TravelAgencyDataModels/Models/IPlaceModel.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace TravelAgencyDataModels.Models
|
||||
{
|
||||
public interface IPlaceModel : IId
|
||||
{
|
||||
string PlaceName { get; }
|
||||
|
||||
string PlaceAddress { get; }
|
||||
|
||||
int ExcursionId { get; }
|
||||
}
|
||||
}
|
13
TravelAgency/TravelAgencyDataModels/Models/ITourModel.cs
Normal file
13
TravelAgency/TravelAgencyDataModels/Models/ITourModel.cs
Normal file
@ -0,0 +1,13 @@
|
||||
namespace TravelAgencyDataModels.Models
|
||||
{
|
||||
public interface ITourModel : IId
|
||||
{
|
||||
string TourName { get; }
|
||||
|
||||
string TourDescription { get; }
|
||||
|
||||
double Price { get; }
|
||||
|
||||
int UserId { get; }
|
||||
}
|
||||
}
|
19
TravelAgency/TravelAgencyDataModels/Models/ITripModel.cs
Normal file
19
TravelAgency/TravelAgencyDataModels/Models/ITripModel.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TravelAgencyDataModels.Models
|
||||
{
|
||||
public interface ITripModel : IId
|
||||
{
|
||||
string TripName { get; }
|
||||
|
||||
DateTime TripDate { get; }
|
||||
|
||||
int GuideId { get; }
|
||||
|
||||
Dictionary<int, IPlaceModel> TripPlaces { get; }
|
||||
}
|
||||
}
|
15
TravelAgency/TravelAgencyDataModels/Models/IUserModel.cs
Normal file
15
TravelAgency/TravelAgencyDataModels/Models/IUserModel.cs
Normal file
@ -0,0 +1,15 @@
|
||||
namespace TravelAgencyDataModels.Models
|
||||
{
|
||||
public interface IUserModel : IId
|
||||
{
|
||||
string UserFIO { get; }
|
||||
|
||||
string Email { get; }
|
||||
|
||||
string PhoneNumber { get; }
|
||||
|
||||
string Login { get; }
|
||||
|
||||
string Password { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user