// using System; using BeautySalonDatabaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #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", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Client", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ClientFIO") .IsRequired() .HasColumnType("text"); b.Property("PhoneNumber") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Clients"); }); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Master", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("MasterFIO") .IsRequired() .HasColumnType("text"); b.Property("Wage") .HasColumnType("double precision"); b.HasKey("Id"); b.ToTable("Masters"); }); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.MasterService", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("MasterId") .HasColumnType("integer"); b.Property("ServiceId") .HasColumnType("integer"); b.Property("Wage") .HasColumnType("double precision"); b.HasKey("Id"); b.HasIndex("MasterId"); b.HasIndex("ServiceId"); b.ToTable("MasterServices"); }); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Service", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Cost") .HasColumnType("double precision"); b.Property("ServiceName") .IsRequired() .HasColumnType("text"); b.Property("Time") .HasColumnType("double precision"); b.HasKey("Id"); b.ToTable("Services"); }); modelBuilder.Entity("BeautySalonDatabaseImplement.Models.Visit", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ClientFIO") .IsRequired() .HasColumnType("text"); b.Property("ClientId") .HasColumnType("integer"); b.Property("DateOfVisit") .HasColumnType("timestamp with time zone"); b.Property("MasterId") .HasColumnType("integer"); b.Property("ServiceId") .HasColumnType("integer"); b.Property("ServiceName") .IsRequired() .HasColumnType("text"); b.Property("Sum") .HasColumnType("double precision"); 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", null) .WithMany("Visits") .HasForeignKey("MasterId"); b.HasOne("BeautySalonDatabaseImplement.Models.Service", "Service") .WithMany() .HasForeignKey("ServiceId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Client"); 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 } } }