сохра
This commit is contained in:
parent
2c4330eace
commit
7b9c99f532
@ -487,8 +487,12 @@ namespace HotelAdministratorApp.Controllers
|
|||||||
throw new Exception("Вы как сюда попали? Сюда вход только авторизованным");
|
throw new Exception("Вы как сюда попали? Сюда вход только авторизованным");
|
||||||
}
|
}
|
||||||
using var context = new HotelDataBase();
|
using var context = new HotelDataBase();
|
||||||
var roomElem = APIClient.GetRequest<RoomViewModel>($"api/main/getroombyid?roomId={room}");
|
var roomElem = APIClient.GetRequest<RoomViewModel>($"api/main/getroombyid?roomId={room}"); //комната со всеми ее атрибутами
|
||||||
var dinners = _dinner.ReadList(new DinnerSearchModel { AdministratorId = APIClient.Administrator.Id });
|
var dinners = _dinner.ReadList(new DinnerSearchModel { AdministratorId = APIClient.Administrator.Id }); //все обеды у администратора
|
||||||
|
List<int> roomDinnersIds = context.RoomDinners
|
||||||
|
.Where(rd => rd.RoomId == room)
|
||||||
|
.Select(rd => rd.DinnerId)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
APIClient.PostRequest("api/main/updateroom", new RoomBindingModel
|
APIClient.PostRequest("api/main/updateroom", new RoomBindingModel
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@ namespace HotelBusinessLogic.BusinessLogic
|
|||||||
_saveToExcel.CreateReport(new ExcelInfoAdministrator
|
_saveToExcel.CreateReport(new ExcelInfoAdministrator
|
||||||
{
|
{
|
||||||
FileName = model.FileName,
|
FileName = model.FileName,
|
||||||
Title = "Список покупок по медикаментам",
|
Title = "Список покупок по обедам",
|
||||||
MealPlanDinners = GetMealPlanDinners(model)
|
MealPlanDinners = GetMealPlanDinners(model)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@ namespace HotelBusinessLogic.BusinessLogic
|
|||||||
_saveToWord.CreateDoc(new WordInfoAdministrator
|
_saveToWord.CreateDoc(new WordInfoAdministrator
|
||||||
{
|
{
|
||||||
FileName = model.FileName,
|
FileName = model.FileName,
|
||||||
Title = "Список покупок по медикаментам",
|
Title = "Список покупок по обедам",
|
||||||
MealPlanDinners = GetMealPlanDinners(model)
|
MealPlanDinners = GetMealPlanDinners(model)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
@ -8,8 +8,9 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DocumentFormat.OpenXml" Version="3.0.2" />
|
<PackageReference Include="DocumentFormat.OpenXml" Version="3.0.2" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
||||||
<PackageReference Include="PdfSharp.MigraDoc.Standard" Version="1.51.15" />
|
<PackageReference Include="PdfSharp.MigraDoc.Standard" Version="1.51.15" />
|
||||||
|
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -18,21 +18,21 @@ namespace HotelBusinessLogic.OfficePackage
|
|||||||
Text = info.Title,
|
Text = info.Title,
|
||||||
Style =
|
Style =
|
||||||
"NormalTitle",
|
"NormalTitle",
|
||||||
ParagraphAlignment = PdfParagraphAligmentType.Center
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
});
|
});
|
||||||
CreateParagraph(new PdfParagraph
|
CreateParagraph(new PdfParagraph
|
||||||
{
|
{
|
||||||
Text = $"с {info.DateFrom.ToShortDateString()} по {info.DateTo.ToShortDateString()}",
|
Text = $"с {info.DateFrom.ToShortDateString()} по {info.DateTo.ToShortDateString()}",
|
||||||
Style
|
Style
|
||||||
= "Normal",
|
= "Normal",
|
||||||
ParagraphAlignment = PdfParagraphAligmentType.Center
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
});
|
});
|
||||||
CreateTable(new List<string> { "4cm", "4cm", "4cm", "4cm" });
|
CreateTable(new List<string> { "4cm", "4cm", "4cm", "4cm" });
|
||||||
CreateRow(new PdfRowParameters
|
CreateRow(new PdfRowParameters
|
||||||
{
|
{
|
||||||
Texts = new List<string> { "Дата", "Название обеда", "Комната", "Бронь" },
|
Texts = new List<string> { "Дата", "Название медикамента", "Посещение ", "Лекарство" },
|
||||||
Style = "NormalTitle",
|
Style = "NormalTitle",
|
||||||
ParagraphAlignment = PdfParagraphAligmentType.Center
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
});
|
});
|
||||||
foreach (var dinner in info.ReportRoomsConferences)
|
foreach (var dinner in info.ReportRoomsConferences)
|
||||||
{
|
{
|
||||||
@ -40,24 +40,24 @@ namespace HotelBusinessLogic.OfficePackage
|
|||||||
{
|
{
|
||||||
Texts = new List<string> { "", dinner.DinnerName, "", "" },
|
Texts = new List<string> { "", dinner.DinnerName, "", "" },
|
||||||
Style = "NormalTitle",
|
Style = "NormalTitle",
|
||||||
ParagraphAlignment = PdfParagraphAligmentType.Center
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
});
|
});
|
||||||
foreach (var conference in dinner.Conferences)
|
foreach (var conf in dinner.Conferences)
|
||||||
{
|
{
|
||||||
CreateRow(new PdfRowParameters
|
CreateRow(new PdfRowParameters
|
||||||
{
|
{
|
||||||
Texts = new List<string> { conference.StartDate.ToString(), "", "", conference.ConferenceName },
|
Texts = new List<string> { conf.StartDate.ToString(), "", "", conf.ConferenceName },
|
||||||
Style = "Normal",
|
Style = "Normal",
|
||||||
ParagraphAlignment = PdfParagraphAligmentType.Center
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
foreach (var room in dinner.Rooms)
|
foreach (var guidance in dinner.Rooms)
|
||||||
{
|
{
|
||||||
CreateRow(new PdfRowParameters
|
CreateRow(new PdfRowParameters
|
||||||
{
|
{
|
||||||
Texts = new List<string> { room.DateCreate.ToString(), "", room.RoomNumber.ToString(), "" },
|
Texts = new List<string> { guidance.DateCreate.ToString(), "", guidance.RoomNumber.ToString(), "" },
|
||||||
Style = "Normal",
|
Style = "Normal",
|
||||||
ParagraphAlignment = PdfParagraphAligmentType.Center
|
ParagraphAlignment = PdfParagraphAlignmentType.Center
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace HotelBusinessLogic.OfficePackage.HelperEnums
|
namespace HotelBusinessLogic.OfficePackage.HelperEnums
|
||||||
{
|
{
|
||||||
public enum PdfParagraphAligmentType
|
public enum PdfParagraphAlignmentType
|
||||||
{
|
{
|
||||||
Center,
|
Center,
|
||||||
Left,
|
Left,
|
||||||
|
@ -14,6 +14,5 @@ namespace HotelBusinessLogic.OfficePackage.HelperModels
|
|||||||
public DateTime DateFrom { get; set; }
|
public DateTime DateFrom { get; set; }
|
||||||
public DateTime DateTo { get; set; }
|
public DateTime DateTo { get; set; }
|
||||||
public List<ReportRoomsConferencesViewModel> ReportRoomsConferences { get; set; } = new();
|
public List<ReportRoomsConferencesViewModel> ReportRoomsConferences { get; set; } = new();
|
||||||
/* public List<ReportVisitsDrugsViewModel> ReportVisitsDrugs { get; set; } = new();*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ namespace HotelBusinessLogic.OfficePackage.HelperModels
|
|||||||
{
|
{
|
||||||
public string Text { get; set; } = string.Empty;
|
public string Text { get; set; } = string.Empty;
|
||||||
public string Style { get; set; } = string.Empty;
|
public string Style { get; set; } = string.Empty;
|
||||||
public PdfParagraphAligmentType ParagraphAlignment { get; set; }
|
public PdfParagraphAlignmentType ParagraphAlignment { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,6 @@ namespace HotelBusinessLogic.OfficePackage.HelperModels
|
|||||||
{
|
{
|
||||||
public List<string> Texts { get; set; } = new();
|
public List<string> Texts { get; set; } = new();
|
||||||
public string Style { get; set; } = string.Empty;
|
public string Style { get; set; } = string.Empty;
|
||||||
public PdfParagraphAligmentType ParagraphAlignment { get; set; }
|
public PdfParagraphAlignmentType ParagraphAlignment { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,13 +17,13 @@ namespace HotelBusinessLogic.OfficePackage.Implements
|
|||||||
private Section? _section;
|
private Section? _section;
|
||||||
private Table? _table;
|
private Table? _table;
|
||||||
private static ParagraphAlignment
|
private static ParagraphAlignment
|
||||||
GetParagraphAlignment(PdfParagraphAligmentType type)
|
GetParagraphAlignment(PdfParagraphAlignmentType type)
|
||||||
{
|
{
|
||||||
return type switch
|
return type switch
|
||||||
{
|
{
|
||||||
PdfParagraphAligmentType.Center => ParagraphAlignment.Center,
|
PdfParagraphAlignmentType.Center => ParagraphAlignment.Center,
|
||||||
PdfParagraphAligmentType.Left => ParagraphAlignment.Left,
|
PdfParagraphAlignmentType.Left => ParagraphAlignment.Left,
|
||||||
PdfParagraphAligmentType.Right => ParagraphAlignment.Right,
|
PdfParagraphAlignmentType.Right => ParagraphAlignment.Right,
|
||||||
_ => ParagraphAlignment.Justify,
|
_ => ParagraphAlignment.Justify,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -6,18 +6,16 @@ namespace HotelDataBaseImplement
|
|||||||
{
|
{
|
||||||
public class HotelDataBase : DbContext
|
public class HotelDataBase : DbContext
|
||||||
{
|
{
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
{
|
{
|
||||||
if (optionsBuilder.IsConfigured == false)
|
if (optionsBuilder.IsConfigured == false)
|
||||||
{
|
{
|
||||||
optionsBuilder.UseNpgsql(@"Host=localhost;Port=5432;Database=Hotel_bd;Username=postgres;Password=admin");
|
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=HotellllDataBase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||||
}
|
}
|
||||||
base.OnConfiguring(optionsBuilder);
|
|
||||||
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
|
|
||||||
AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual DbSet<Conference> Conferences { get; set; }
|
base.OnConfiguring(optionsBuilder);
|
||||||
|
}
|
||||||
|
public virtual DbSet<Conference> Conferences { get; set; }
|
||||||
public virtual DbSet<MealPlan> MealPlans { set; get; }
|
public virtual DbSet<MealPlan> MealPlans { set; get; }
|
||||||
public virtual DbSet<Participant> Participants { set; get; }
|
public virtual DbSet<Participant> Participants { set; get; }
|
||||||
public virtual DbSet<Organiser> Organisers { set; get; }
|
public virtual DbSet<Organiser> Organisers { set; get; }
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.11" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.11" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.11" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.5" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.11">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.11">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
@ -3,17 +3,17 @@ using System;
|
|||||||
using HotelDataBaseImplement;
|
using HotelDataBaseImplement;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace HotelDataBaseImplement.Migrations
|
namespace HotelDataBaseImplement.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(HotelDataBase))]
|
[DbContext(typeof(HotelDataBase))]
|
||||||
[Migration("20240501171235_DeleteManyMigration")]
|
[Migration("20240528212239_Init")]
|
||||||
partial class DeleteManyMigration
|
partial class Init
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
@ -21,37 +21,37 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasAnnotation("ProductVersion", "7.0.11")
|
.HasAnnotation("ProductVersion", "7.0.11")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("HotelDataBaseImplement.Models.Administrator", b =>
|
modelBuilder.Entity("HotelDataBaseImplement.Models.Administrator", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("AdministratorEmail")
|
b.Property<string>("AdministratorEmail")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("AdministratorFIO")
|
b.Property<string>("AdministratorFIO")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("AdministratorLogin")
|
b.Property<string>("AdministratorLogin")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("AdministratorPassword")
|
b.Property<string>("AdministratorPassword")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("AdministratorPhone")
|
b.Property<string>("AdministratorPhone")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -62,23 +62,23 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("ConferenceName")
|
b.Property<string>("ConferenceName")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("OrganiserId")
|
b.Property<int>("OrganiserId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<DateTime>("StartDate")
|
b.Property<DateTime>("StartDate")
|
||||||
.HasColumnType("timestamp without time zone");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<string>("Subject")
|
b.Property<string>("Subject")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -91,22 +91,22 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("AdministratorId")
|
b.Property<int>("AdministratorId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int?>("ConferenceId")
|
b.Property<int?>("ConferenceId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateСonference")
|
b.Property<DateTime?>("DateСonference")
|
||||||
.HasColumnType("timestamp without time zone");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<string>("PlaceСonference")
|
b.Property<string>("PlaceСonference")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -121,15 +121,15 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("ConferenceBookingId")
|
b.Property<int>("ConferenceBookingId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("DinnerId")
|
b.Property<int>("DinnerId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -144,15 +144,15 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("ConferenceId")
|
b.Property<int>("ConferenceId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("ParticipantId")
|
b.Property<int>("ParticipantId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -167,22 +167,22 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("AdministratorId")
|
b.Property<int>("AdministratorId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("DinnerName")
|
b.Property<string>("DinnerName")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<double>("DinnerPrice")
|
b.Property<double>("DinnerPrice")
|
||||||
.HasColumnType("double precision");
|
.HasColumnType("float");
|
||||||
|
|
||||||
b.Property<int>("DinnerСalorieСontent")
|
b.Property<int>("DinnerСalorieСontent")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -195,19 +195,19 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("MealPlanName")
|
b.Property<string>("MealPlanName")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<double>("MealPlanPrice")
|
b.Property<double>("MealPlanPrice")
|
||||||
.HasColumnType("double precision");
|
.HasColumnType("float");
|
||||||
|
|
||||||
b.Property<int>("OrganiserId")
|
b.Property<int>("OrganiserId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -220,15 +220,15 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("MealPlanId")
|
b.Property<int>("MealPlanId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("ParticipantId")
|
b.Property<int>("ParticipantId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -243,29 +243,29 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("OrganiserEmail")
|
b.Property<string>("OrganiserEmail")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("OrganiserFIO")
|
b.Property<string>("OrganiserFIO")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("OrganiserLogin")
|
b.Property<string>("OrganiserLogin")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("OrganiserNumber")
|
b.Property<string>("OrganiserNumber")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("OrganiserPassword")
|
b.Property<string>("OrganiserPassword")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -276,20 +276,20 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("Number")
|
b.Property<string>("Number")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("OrganiserId")
|
b.Property<int>("OrganiserId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("ParticipantFIO")
|
b.Property<string>("ParticipantFIO")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -302,24 +302,24 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("AdministratorId")
|
b.Property<int>("AdministratorId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<DateTime>("DateCreate")
|
b.Property<DateTime>("DateCreate")
|
||||||
.HasColumnType("timestamp without time zone");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<int?>("MealPlanId")
|
b.Property<int?>("MealPlanId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("RoomNumber")
|
b.Property<int>("RoomNumber")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<double>("RoomPrice")
|
b.Property<double>("RoomPrice")
|
||||||
.HasColumnType("double precision");
|
.HasColumnType("float");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -334,15 +334,15 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("DinnerId")
|
b.Property<int>("DinnerId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("RoomId")
|
b.Property<int>("RoomId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
@ -1,13 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace HotelDataBaseImplement.Migrations
|
namespace HotelDataBaseImplement.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class DeleteManyMigration : Migration
|
public partial class Init : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
@ -16,13 +15,13 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
name: "Administrators",
|
name: "Administrators",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
AdministratorFIO = table.Column<string>(type: "text", nullable: false),
|
AdministratorFIO = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
AdministratorPhone = table.Column<string>(type: "text", nullable: false),
|
AdministratorPhone = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
AdministratorLogin = table.Column<string>(type: "text", nullable: false),
|
AdministratorLogin = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
AdministratorPassword = table.Column<string>(type: "text", nullable: false),
|
AdministratorPassword = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
AdministratorEmail = table.Column<string>(type: "text", nullable: false)
|
AdministratorEmail = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -33,13 +32,13 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
name: "Organisers",
|
name: "Organisers",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
OrganiserLogin = table.Column<string>(type: "text", nullable: false),
|
OrganiserLogin = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
OrganiserPassword = table.Column<string>(type: "text", nullable: false),
|
OrganiserPassword = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
OrganiserEmail = table.Column<string>(type: "text", nullable: false),
|
OrganiserEmail = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
OrganiserNumber = table.Column<string>(type: "text", nullable: false),
|
OrganiserNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
OrganiserFIO = table.Column<string>(type: "text", nullable: false)
|
OrganiserFIO = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -50,12 +49,12 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
name: "Dinners",
|
name: "Dinners",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
DinnerName = table.Column<string>(type: "text", nullable: false),
|
DinnerName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
DinnerСalorieСontent = table.Column<int>(type: "integer", nullable: false),
|
DinnerСalorieСontent = table.Column<int>(type: "int", nullable: false),
|
||||||
DinnerPrice = table.Column<double>(type: "double precision", nullable: false),
|
DinnerPrice = table.Column<double>(type: "float", nullable: false),
|
||||||
AdministratorId = table.Column<int>(type: "integer", nullable: false)
|
AdministratorId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -72,12 +71,12 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
name: "Conferences",
|
name: "Conferences",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
ConferenceName = table.Column<string>(type: "text", nullable: false),
|
ConferenceName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
Subject = table.Column<string>(type: "text", nullable: false),
|
Subject = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
StartDate = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
OrganiserId = table.Column<int>(type: "integer", nullable: false)
|
OrganiserId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -94,11 +93,11 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
name: "MealPlans",
|
name: "MealPlans",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
MealPlanName = table.Column<string>(type: "text", nullable: false),
|
MealPlanName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
MealPlanPrice = table.Column<double>(type: "double precision", nullable: false),
|
MealPlanPrice = table.Column<double>(type: "float", nullable: false),
|
||||||
OrganiserId = table.Column<int>(type: "integer", nullable: false)
|
OrganiserId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -115,11 +114,11 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
name: "Participants",
|
name: "Participants",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
ParticipantFIO = table.Column<string>(type: "text", nullable: false),
|
ParticipantFIO = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
Number = table.Column<string>(type: "text", nullable: false),
|
Number = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
OrganiserId = table.Column<int>(type: "integer", nullable: false)
|
OrganiserId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -136,12 +135,12 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
name: "ConferenceBookings",
|
name: "ConferenceBookings",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
DateСonference = table.Column<DateTime>(type: "timestamp without time zone", nullable: true),
|
DateСonference = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
AdministratorId = table.Column<int>(type: "integer", nullable: false),
|
AdministratorId = table.Column<int>(type: "int", nullable: false),
|
||||||
ConferenceId = table.Column<int>(type: "integer", nullable: true),
|
ConferenceId = table.Column<int>(type: "int", nullable: true),
|
||||||
PlaceСonference = table.Column<string>(type: "text", nullable: false)
|
PlaceСonference = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -156,20 +155,21 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
name: "FK_ConferenceBookings_Conferences_ConferenceId",
|
name: "FK_ConferenceBookings_Conferences_ConferenceId",
|
||||||
column: x => x.ConferenceId,
|
column: x => x.ConferenceId,
|
||||||
principalTable: "Conferences",
|
principalTable: "Conferences",
|
||||||
principalColumn: "Id");
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "Rooms",
|
name: "Rooms",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
RoomNumber = table.Column<int>(type: "integer", nullable: false),
|
RoomNumber = table.Column<int>(type: "int", nullable: false),
|
||||||
RoomPrice = table.Column<double>(type: "double precision", nullable: false),
|
RoomPrice = table.Column<double>(type: "float", nullable: false),
|
||||||
DateCreate = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
|
DateCreate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
AdministratorId = table.Column<int>(type: "integer", nullable: false),
|
AdministratorId = table.Column<int>(type: "int", nullable: false),
|
||||||
MealPlanId = table.Column<int>(type: "integer", nullable: true)
|
MealPlanId = table.Column<int>(type: "int", nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -184,17 +184,18 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
name: "FK_Rooms_MealPlans_MealPlanId",
|
name: "FK_Rooms_MealPlans_MealPlanId",
|
||||||
column: x => x.MealPlanId,
|
column: x => x.MealPlanId,
|
||||||
principalTable: "MealPlans",
|
principalTable: "MealPlans",
|
||||||
principalColumn: "Id");
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "ConferenceParticipants",
|
name: "ConferenceParticipants",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
ParticipantId = table.Column<int>(type: "integer", nullable: false),
|
ParticipantId = table.Column<int>(type: "int", nullable: false),
|
||||||
ConferenceId = table.Column<int>(type: "integer", nullable: false)
|
ConferenceId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -204,7 +205,7 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
column: x => x.ConferenceId,
|
column: x => x.ConferenceId,
|
||||||
principalTable: "Conferences",
|
principalTable: "Conferences",
|
||||||
principalColumn: "Id",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Restrict);
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_ConferenceParticipants_Participants_ParticipantId",
|
name: "FK_ConferenceParticipants_Participants_ParticipantId",
|
||||||
column: x => x.ParticipantId,
|
column: x => x.ParticipantId,
|
||||||
@ -217,10 +218,10 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
name: "MealPlanParticipants",
|
name: "MealPlanParticipants",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
ParticipantId = table.Column<int>(type: "integer", nullable: false),
|
ParticipantId = table.Column<int>(type: "int", nullable: false),
|
||||||
MealPlanId = table.Column<int>(type: "integer", nullable: false)
|
MealPlanId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -230,49 +231,49 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
column: x => x.MealPlanId,
|
column: x => x.MealPlanId,
|
||||||
principalTable: "MealPlans",
|
principalTable: "MealPlans",
|
||||||
principalColumn: "Id",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Restrict);
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_MealPlanParticipants_Participants_ParticipantId",
|
name: "FK_MealPlanParticipants_Participants_ParticipantId",
|
||||||
column: x => x.ParticipantId,
|
column: x => x.ParticipantId,
|
||||||
principalTable: "Participants",
|
principalTable: "Participants",
|
||||||
principalColumn: "Id",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "ConferenceBookingDinners",
|
name: "ConferenceBookingDinners",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
ConferenceBookingId = table.Column<int>(type: "integer", nullable: false),
|
ConferenceBookingId = table.Column<int>(type: "int", nullable: false),
|
||||||
DinnerId = table.Column<int>(type: "integer", nullable: false)
|
DinnerId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
table.PrimaryKey("PK_ConferenceBookingDinners", x => x.Id);
|
table.PrimaryKey("PK_ConferenceBookingDinners", x => x.Id);
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_ConferenceBookingDinners_ConferenceBookings_ConferenceBooki~",
|
name: "FK_ConferenceBookingDinners_ConferenceBookings_ConferenceBookingId",
|
||||||
column: x => x.ConferenceBookingId,
|
column: x => x.ConferenceBookingId,
|
||||||
principalTable: "ConferenceBookings",
|
principalTable: "ConferenceBookings",
|
||||||
principalColumn: "Id",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Restrict);
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_ConferenceBookingDinners_Dinners_DinnerId",
|
name: "FK_ConferenceBookingDinners_Dinners_DinnerId",
|
||||||
column: x => x.DinnerId,
|
column: x => x.DinnerId,
|
||||||
principalTable: "Dinners",
|
principalTable: "Dinners",
|
||||||
principalColumn: "Id",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "RoomDinners",
|
name: "RoomDinners",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
RoomId = table.Column<int>(type: "integer", nullable: false),
|
RoomId = table.Column<int>(type: "int", nullable: false),
|
||||||
DinnerId = table.Column<int>(type: "integer", nullable: false)
|
DinnerId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
@ -282,13 +283,13 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
column: x => x.DinnerId,
|
column: x => x.DinnerId,
|
||||||
principalTable: "Dinners",
|
principalTable: "Dinners",
|
||||||
principalColumn: "Id",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Restrict);
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_RoomDinners_Rooms_RoomId",
|
name: "FK_RoomDinners_Rooms_RoomId",
|
||||||
column: x => x.RoomId,
|
column: x => x.RoomId,
|
||||||
principalTable: "Rooms",
|
principalTable: "Rooms",
|
||||||
principalColumn: "Id",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
@ -3,8 +3,8 @@ using System;
|
|||||||
using HotelDataBaseImplement;
|
using HotelDataBaseImplement;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -18,37 +18,37 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasAnnotation("ProductVersion", "7.0.11")
|
.HasAnnotation("ProductVersion", "7.0.11")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("HotelDataBaseImplement.Models.Administrator", b =>
|
modelBuilder.Entity("HotelDataBaseImplement.Models.Administrator", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("AdministratorEmail")
|
b.Property<string>("AdministratorEmail")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("AdministratorFIO")
|
b.Property<string>("AdministratorFIO")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("AdministratorLogin")
|
b.Property<string>("AdministratorLogin")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("AdministratorPassword")
|
b.Property<string>("AdministratorPassword")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("AdministratorPhone")
|
b.Property<string>("AdministratorPhone")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -59,23 +59,23 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("ConferenceName")
|
b.Property<string>("ConferenceName")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("OrganiserId")
|
b.Property<int>("OrganiserId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<DateTime>("StartDate")
|
b.Property<DateTime>("StartDate")
|
||||||
.HasColumnType("timestamp without time zone");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<string>("Subject")
|
b.Property<string>("Subject")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -88,22 +88,22 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("AdministratorId")
|
b.Property<int>("AdministratorId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int?>("ConferenceId")
|
b.Property<int?>("ConferenceId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<DateTime?>("DateСonference")
|
b.Property<DateTime?>("DateСonference")
|
||||||
.HasColumnType("timestamp without time zone");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<string>("PlaceСonference")
|
b.Property<string>("PlaceСonference")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -118,15 +118,15 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("ConferenceBookingId")
|
b.Property<int>("ConferenceBookingId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("DinnerId")
|
b.Property<int>("DinnerId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -141,15 +141,15 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("ConferenceId")
|
b.Property<int>("ConferenceId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("ParticipantId")
|
b.Property<int>("ParticipantId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -164,22 +164,22 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("AdministratorId")
|
b.Property<int>("AdministratorId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("DinnerName")
|
b.Property<string>("DinnerName")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<double>("DinnerPrice")
|
b.Property<double>("DinnerPrice")
|
||||||
.HasColumnType("double precision");
|
.HasColumnType("float");
|
||||||
|
|
||||||
b.Property<int>("DinnerСalorieСontent")
|
b.Property<int>("DinnerСalorieСontent")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -192,19 +192,19 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("MealPlanName")
|
b.Property<string>("MealPlanName")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<double>("MealPlanPrice")
|
b.Property<double>("MealPlanPrice")
|
||||||
.HasColumnType("double precision");
|
.HasColumnType("float");
|
||||||
|
|
||||||
b.Property<int>("OrganiserId")
|
b.Property<int>("OrganiserId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -217,15 +217,15 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("MealPlanId")
|
b.Property<int>("MealPlanId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("ParticipantId")
|
b.Property<int>("ParticipantId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -240,29 +240,29 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("OrganiserEmail")
|
b.Property<string>("OrganiserEmail")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("OrganiserFIO")
|
b.Property<string>("OrganiserFIO")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("OrganiserLogin")
|
b.Property<string>("OrganiserLogin")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("OrganiserNumber")
|
b.Property<string>("OrganiserNumber")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("OrganiserPassword")
|
b.Property<string>("OrganiserPassword")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -273,20 +273,20 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<string>("Number")
|
b.Property<string>("Number")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("OrganiserId")
|
b.Property<int>("OrganiserId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("ParticipantFIO")
|
b.Property<string>("ParticipantFIO")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -299,24 +299,24 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("AdministratorId")
|
b.Property<int>("AdministratorId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<DateTime>("DateCreate")
|
b.Property<DateTime>("DateCreate")
|
||||||
.HasColumnType("timestamp without time zone");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<int?>("MealPlanId")
|
b.Property<int?>("MealPlanId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("RoomNumber")
|
b.Property<int>("RoomNumber")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<double>("RoomPrice")
|
b.Property<double>("RoomPrice")
|
||||||
.HasColumnType("double precision");
|
.HasColumnType("float");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
@ -331,15 +331,15 @@ namespace HotelDataBaseImplement.Migrations
|
|||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("DinnerId")
|
b.Property<int>("DinnerId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("RoomId")
|
b.Property<int>("RoomId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user