// using System; using BeautySalonDatabaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace BeautySalonDatabaseImplement.Migrations { [DbContext(typeof(BeautySalonDatabase))] partial class BeautySalonDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.5") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Client", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClientFIO") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("PhoneNumber") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Clients"); }); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Master", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("MasterFIO") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Wage") .HasColumnType("float"); b.HasKey("Id"); b.ToTable("Masters"); }); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.MasterService", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("MasterId") .HasColumnType("int"); b.Property("ServiceId") .HasColumnType("int"); b.Property("Wage") .HasColumnType("float"); b.HasKey("Id"); b.HasIndex("MasterId"); b.HasIndex("ServiceId"); b.ToTable("MasterServices"); }); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Cost") .HasColumnType("float"); b.Property("ServiceName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Time") .HasColumnType("float"); b.HasKey("Id"); b.ToTable("Services"); }); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Visit", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClientFIO") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ClientId") .HasColumnType("int"); b.Property("DateOfVisit") .HasColumnType("datetime2"); b.Property("MasterFIO") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("MasterId") .HasColumnType("int"); b.Property("ServiceId") .HasColumnType("int"); b.Property("ServiceName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Sum") .HasColumnType("float"); b.HasKey("Id"); b.HasIndex("ClientId"); b.HasIndex("MasterId"); b.HasIndex("ServiceId"); b.ToTable("Visits"); }); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.MasterService", b => { b.HasOne("BeautySalonDatabaseImplement.Models.Master", "Master") .WithMany("Services") .HasForeignKey("MasterId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("BeautySalonDatabaseImplement.Models.Service", "Service") .WithMany("MasterServices") .HasForeignKey("ServiceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Master"); b.Navigation("Service"); }); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Visit", b => { b.HasOne("BeautySalonDatabaseImplement.Models.Client", "Client") .WithMany() .HasForeignKey("ClientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("BeautySalonDatabaseImplement.Models.Master", "Master") .WithMany("Visits") .HasForeignKey("MasterId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("BeautySalonDatabaseImplement.Models.Service", "Service") .WithMany() .HasForeignKey("ServiceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Client"); b.Navigation("Master"); b.Navigation("Service"); }); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Master", b => { b.Navigation("Services"); b.Navigation("Visits"); }); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Service", b => { b.Navigation("MasterServices"); }); #pragma warning restore 612, 618 } } }