// using System; using AbstractLawFirmDatabaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace AbstractLawFirmDatabaseImplement.Migrations { [DbContext(typeof(AbstractLawFirmDatabase))] [Migration("20240310114902_InitialCreate")] partial class InitialCreate { /// protected override void BuildTargetModel(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.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.Component", b => { b.Navigation("DocumentComponents"); }); modelBuilder.Entity("AbstractLawFirmDatabaseImplement.Models.Document", b => { b.Navigation("Components"); b.Navigation("Orders"); }); #pragma warning restore 612, 618 } } }