281 lines
9.5 KiB
C#
281 lines
9.5 KiB
C#
|
// <auto-generated />
|
|||
|
using System;
|
|||
|
using HotelDatabaseImplement;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace HotelDatabaseImplement.Migrations
|
|||
|
{
|
|||
|
[DbContext(typeof(HotelDataBase))]
|
|||
|
[Migration("20230407095141_init")]
|
|||
|
partial class init
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
{
|
|||
|
#pragma warning disable 612, 618
|
|||
|
modelBuilder
|
|||
|
.HasAnnotation("ProductVersion", "8.0.0-preview.2.23128.3")
|
|||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|||
|
|
|||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|||
|
|
|||
|
modelBuilder.Entity("HotelDatabaseImplement.Models.Cleaning", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<DateTime>("Date")
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.Property<int>("RoomId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Cleanings");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("HotelDatabaseImplement.Models.CleaningInstrument", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<int>("CleaningId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("CleaningInstrumentsId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("CleaningId");
|
|||
|
|
|||
|
b.HasIndex("CleaningInstrumentsId");
|
|||
|
|
|||
|
b.ToTable("CleaningInstrument");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("HotelDatabaseImplement.Models.CleaningInstruments", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("Type")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("CleaningInstruments");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("HotelDatabaseImplement.Models.Guest", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("LastName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("Name")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("SecondName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Guests");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("HotelDatabaseImplement.Models.Maitre", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("LastName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("Login")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("Name")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("Password")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("SecondName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Maitres");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("HotelDatabaseImplement.Models.Reservation", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<DateTime>("EndDate")
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.Property<int>("GuestId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("MaitreId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<DateTime>("StartDate")
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Reservations");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("HotelDatabaseImplement.Models.ReservationRoom", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<int>("ReservationId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("RoomId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int?>("RoomId1")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("RoomId");
|
|||
|
|
|||
|
b.HasIndex("RoomId1");
|
|||
|
|
|||
|
b.ToTable("ReservationRooms");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("HotelDatabaseImplement.Models.Room", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<double>("Cost")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.Property<int>("ReservationId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<string>("Type")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("ReservationId");
|
|||
|
|
|||
|
b.ToTable("Rooms");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("HotelDatabaseImplement.Models.CleaningInstrument", b =>
|
|||
|
{
|
|||
|
b.HasOne("HotelDatabaseImplement.Models.Cleaning", "Cleaning")
|
|||
|
.WithMany("CleaningInstrument")
|
|||
|
.HasForeignKey("CleaningId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.HasOne("HotelDatabaseImplement.Models.CleaningInstruments", "CleaningInstruments")
|
|||
|
.WithMany()
|
|||
|
.HasForeignKey("CleaningInstrumentsId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Cleaning");
|
|||
|
|
|||
|
b.Navigation("CleaningInstruments");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("HotelDatabaseImplement.Models.ReservationRoom", b =>
|
|||
|
{
|
|||
|
b.HasOne("HotelDatabaseImplement.Models.Reservation", "Reservation")
|
|||
|
.WithMany("Rooms")
|
|||
|
.HasForeignKey("RoomId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.HasOne("HotelDatabaseImplement.Models.Room", "Room")
|
|||
|
.WithMany()
|
|||
|
.HasForeignKey("RoomId1");
|
|||
|
|
|||
|
b.Navigation("Reservation");
|
|||
|
|
|||
|
b.Navigation("Room");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("HotelDatabaseImplement.Models.Room", b =>
|
|||
|
{
|
|||
|
b.HasOne("HotelDatabaseImplement.Models.Reservation", "Reservation")
|
|||
|
.WithMany()
|
|||
|
.HasForeignKey("ReservationId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Reservation");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("HotelDatabaseImplement.Models.Cleaning", b =>
|
|||
|
{
|
|||
|
b.Navigation("CleaningInstrument");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("HotelDatabaseImplement.Models.Reservation", b =>
|
|||
|
{
|
|||
|
b.Navigation("Rooms");
|
|||
|
});
|
|||
|
#pragma warning restore 612, 618
|
|||
|
}
|
|||
|
}
|
|||
|
}
|