// using System; using AbstractLawFirmDatabaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace AbstractLawFirmDatabaseImplement.Migrations { [DbContext(typeof(AbstractLawFirmDatabase))] partial class AbstractLawFirmDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.16") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("AbstractLawFirmDatabaseImplement.Models.Component", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ComponentName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Cost") .HasColumnType("float"); b.HasKey("Id"); b.ToTable("Components"); }); modelBuilder.Entity("AbstractLawFirmDatabaseImplement.Models.Document", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("DocumentName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Price") .HasColumnType("float"); b.HasKey("Id"); b.ToTable("Documents"); }); modelBuilder.Entity("AbstractLawFirmDatabaseImplement.Models.DocumentComponent", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ComponentId") .HasColumnType("int"); b.Property("Count") .HasColumnType("int"); b.Property("DocumentId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ComponentId"); b.HasIndex("DocumentId"); b.ToTable("DocumentComponents"); }); modelBuilder.Entity("AbstractLawFirmDatabaseImplement.Models.Order", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("DateCreate") .HasColumnType("datetime2"); b.Property("DateImplement") .HasColumnType("datetime2"); b.Property("DocumentId") .HasColumnType("int"); b.Property("Status") .HasColumnType("int"); b.Property("Sum") .HasColumnType("float"); b.HasKey("Id"); b.HasIndex("DocumentId"); b.ToTable("Orders"); }); modelBuilder.Entity("AbstractLawFirmDatabaseImplement.Models.Shop", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Address") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("MaxCountDocuments") .HasColumnType("int"); b.Property("OpeningDate") .HasColumnType("datetime2"); b.Property("ShopName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Shops"); }); modelBuilder.Entity("AbstractLawFirmDatabaseImplement.Models.ShopDocument", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("DocumentId") .HasColumnType("int"); b.Property("ShopId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("DocumentId"); b.HasIndex("ShopId"); b.ToTable("ShopDocuments"); }); modelBuilder.Entity("AbstractLawFirmDatabaseImplement.Models.DocumentComponent", b => { b.HasOne("AbstractLawFirmDatabaseImplement.Models.Component", "Component") .WithMany("DocumentComponents") .HasForeignKey("ComponentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("AbstractLawFirmDatabaseImplement.Models.Document", "Document") .WithMany("Components") .HasForeignKey("DocumentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Component"); b.Navigation("Document"); }); modelBuilder.Entity("AbstractLawFirmDatabaseImplement.Models.Order", b => { b.HasOne("AbstractLawFirmDatabaseImplement.Models.Document", "Document") .WithMany("Orders") .HasForeignKey("DocumentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Document"); }); modelBuilder.Entity("AbstractLawFirmDatabaseImplement.Models.ShopDocument", b => { b.HasOne("AbstractLawFirmDatabaseImplement.Models.Document", "Document") .WithMany() .HasForeignKey("DocumentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("AbstractLawFirmDatabaseImplement.Models.Shop", "Shop") .WithMany("Documents") .HasForeignKey("ShopId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Document"); b.Navigation("Shop"); }); modelBuilder.Entity("AbstractLawFirmDatabaseImplement.Models.Component", b => { b.Navigation("DocumentComponents"); }); modelBuilder.Entity("AbstractLawFirmDatabaseImplement.Models.Document", b => { b.Navigation("Components"); b.Navigation("Orders"); }); modelBuilder.Entity("AbstractLawFirmDatabaseImplement.Models.Shop", b => { b.Navigation("Documents"); }); #pragma warning restore 612, 618 } } }