// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using PizzeriaDatabaseImplement; #nullable disable namespace PizzeriaDatabaseImplement.Migrations { [DbContext(typeof(PizzeriaDatabase))] [Migration("20240402121349_InitMail")] partial class InitMail { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.Client", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); 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("PizzeriaDatabaseImplement.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("PizzeriaDatabaseImplement.Models.Implementer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); 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("PizzeriaDatabaseImplement.Models.MessageInfo", b => { b.Property("MessageId") .HasColumnType("nvarchar(450)"); b.Property("Body") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ClientId") .HasColumnType("int"); b.Property("DateDelivery") .HasColumnType("datetime2"); b.Property("SenderName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Subject") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("MessageId"); b.HasIndex("ClientId"); b.ToTable("MessageInfos"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.Order", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); 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("PizzaId") .HasColumnType("int"); b.Property("Status") .HasColumnType("int"); b.Property("Sum") .HasColumnType("float"); b.HasKey("Id"); b.HasIndex("ClientId"); b.HasIndex("ImplementerId"); b.HasIndex("PizzaId"); b.ToTable("Orders"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.Pizza", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("PizzaName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Price") .HasColumnType("float"); b.HasKey("Id"); b.ToTable("Pizzas"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.PizzaComponent", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ComponentId") .HasColumnType("int"); b.Property("Count") .HasColumnType("int"); b.Property("PizzaId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ComponentId"); b.HasIndex("PizzaId"); b.ToTable("PizzaComponents"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.MessageInfo", b => { b.HasOne("PizzeriaDatabaseImplement.Models.Client", "Client") .WithMany("ClientMessages") .HasForeignKey("ClientId"); b.Navigation("Client"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.Order", b => { b.HasOne("PizzeriaDatabaseImplement.Models.Client", "Client") .WithMany("ClientOrders") .HasForeignKey("ClientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("PizzeriaDatabaseImplement.Models.Implementer", "Implementer") .WithMany("Order") .HasForeignKey("ImplementerId"); b.HasOne("PizzeriaDatabaseImplement.Models.Pizza", "Pizza") .WithMany("Orders") .HasForeignKey("PizzaId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Client"); b.Navigation("Implementer"); b.Navigation("Pizza"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.PizzaComponent", b => { b.HasOne("PizzeriaDatabaseImplement.Models.Component", "Component") .WithMany("PizzaComponents") .HasForeignKey("ComponentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("PizzeriaDatabaseImplement.Models.Pizza", "Pizza") .WithMany("Components") .HasForeignKey("PizzaId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Component"); b.Navigation("Pizza"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.Client", b => { b.Navigation("ClientMessages"); b.Navigation("ClientOrders"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.Component", b => { b.Navigation("PizzaComponents"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.Implementer", b => { b.Navigation("Order"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.Pizza", b => { b.Navigation("Components"); b.Navigation("Orders"); }); #pragma warning restore 612, 618 } } }