// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using ShipyardDatabaseImplement; #nullable disable namespace ShipyardDatabaseImplement.Migrations { [DbContext(typeof(ShipyardDataBase))] [Migration("20240518124638_addImplementers")] partial class addImplementers { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "6.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); modelBuilder.Entity("ShipyardDatabaseImplement.Models.Client", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); b.Property("ClientFIO") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Password") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Clients"); }); modelBuilder.Entity("ShipyardDatabaseImplement.Models.Component", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); b.Property("ComponentName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Cost") .HasColumnType("float"); b.HasKey("Id"); b.ToTable("Components"); }); modelBuilder.Entity("ShipyardDatabaseImplement.Models.Implementer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); b.Property("ImplementerFIO") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Password") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Qualification") .HasColumnType("int"); b.Property("WorkExperience") .HasColumnType("int"); b.HasKey("Id"); b.ToTable("Implementers"); }); modelBuilder.Entity("ShipyardDatabaseImplement.Models.Order", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); b.Property("ClientId") .HasColumnType("int"); b.Property("Count") .HasColumnType("int"); b.Property("DateCreate") .HasColumnType("datetime2"); b.Property("DateImplement") .HasColumnType("datetime2"); b.Property("ImplementerId") .HasColumnType("int"); b.Property("ShipId") .HasColumnType("int"); b.Property("Status") .HasColumnType("int"); b.Property("Sum") .HasColumnType("float"); b.HasKey("Id"); b.HasIndex("ClientId"); b.HasIndex("ImplementerId"); b.HasIndex("ShipId"); b.ToTable("Orders"); }); modelBuilder.Entity("ShipyardDatabaseImplement.Models.Ship", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); b.Property("Price") .HasColumnType("float"); b.Property("ShipName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Ships"); }); modelBuilder.Entity("ShipyardDatabaseImplement.Models.ShipComponent", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"), 1L, 1); b.Property("ComponentId") .HasColumnType("int"); b.Property("Count") .HasColumnType("int"); b.Property("ShipId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ComponentId"); b.HasIndex("ShipId"); b.ToTable("ShipComponents"); }); modelBuilder.Entity("ShipyardDatabaseImplement.Models.Order", b => { b.HasOne("ShipyardDatabaseImplement.Models.Client", "Client") .WithMany("Orders") .HasForeignKey("ClientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("ShipyardDatabaseImplement.Models.Implementer", "Implementer") .WithMany("Orders") .HasForeignKey("ImplementerId"); b.HasOne("ShipyardDatabaseImplement.Models.Ship", "Ship") .WithMany("Orders") .HasForeignKey("ShipId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Client"); b.Navigation("Implementer"); b.Navigation("Ship"); }); modelBuilder.Entity("ShipyardDatabaseImplement.Models.ShipComponent", b => { b.HasOne("ShipyardDatabaseImplement.Models.Component", "Component") .WithMany("ShipComponents") .HasForeignKey("ComponentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("ShipyardDatabaseImplement.Models.Ship", "Ship") .WithMany("Components") .HasForeignKey("ShipId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Component"); b.Navigation("Ship"); }); modelBuilder.Entity("ShipyardDatabaseImplement.Models.Client", b => { b.Navigation("Orders"); }); modelBuilder.Entity("ShipyardDatabaseImplement.Models.Component", b => { b.Navigation("ShipComponents"); }); modelBuilder.Entity("ShipyardDatabaseImplement.Models.Implementer", b => { b.Navigation("Orders"); }); modelBuilder.Entity("ShipyardDatabaseImplement.Models.Ship", b => { b.Navigation("Components"); b.Navigation("Orders"); }); #pragma warning restore 612, 618 } } }