// using System; using FlowerShopDatabaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace FlowerShopDatabaseImplement.Migrations { [DbContext(typeof(FlowerShopDatabase))] partial class FlowerShopDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Bouquet", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BouquetName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Price") .HasColumnType("float"); b.HasKey("Id"); b.ToTable("Bouquets"); }); modelBuilder.Entity("FlowerShopDatabaseImplement.Models.BouquetComponent", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BouquetId") .HasColumnType("int"); b.Property("ComponentId") .HasColumnType("int"); b.Property("Count") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("BouquetId"); b.HasIndex("ComponentId"); b.ToTable("BouquetComponents"); }); modelBuilder.Entity("FlowerShopDatabaseImplement.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("FlowerShopDatabaseImplement.Models.Order", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BouquetId") .HasColumnType("int"); b.Property("Count") .HasColumnType("int"); b.Property("DateCreate") .HasColumnType("datetime2"); b.Property("DateImplement") .HasColumnType("datetime2"); b.Property("Status") .HasColumnType("int"); b.Property("Sum") .HasColumnType("float"); b.HasKey("Id"); b.HasIndex("BouquetId"); b.ToTable("Orders"); }); modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Shop", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Address") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("MaxCountBouquets") .HasColumnType("int"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("OpeningDate") .HasColumnType("datetime2"); b.HasKey("Id"); b.ToTable("Shops"); }); modelBuilder.Entity("FlowerShopDatabaseImplement.Models.ShopBouquet", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BouquetId") .HasColumnType("int"); b.Property("Count") .HasColumnType("int"); b.Property("ShopId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("BouquetId"); b.HasIndex("ShopId"); b.ToTable("ShopBouquets"); }); modelBuilder.Entity("FlowerShopDatabaseImplement.Models.BouquetComponent", b => { b.HasOne("FlowerShopDatabaseImplement.Models.Bouquet", "Bouquet") .WithMany("Components") .HasForeignKey("BouquetId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("FlowerShopDatabaseImplement.Models.Component", "Component") .WithMany("BouquetComponents") .HasForeignKey("ComponentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Bouquet"); b.Navigation("Component"); }); modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Order", b => { b.HasOne("FlowerShopDatabaseImplement.Models.Bouquet", "Bouquet") .WithMany("Orders") .HasForeignKey("BouquetId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Bouquet"); }); modelBuilder.Entity("FlowerShopDatabaseImplement.Models.ShopBouquet", b => { b.HasOne("FlowerShopDatabaseImplement.Models.Bouquet", "Bouquet") .WithMany() .HasForeignKey("BouquetId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("FlowerShopDatabaseImplement.Models.Shop", "Shop") .WithMany("Bouquets") .HasForeignKey("ShopId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Bouquet"); b.Navigation("Shop"); }); modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Bouquet", b => { b.Navigation("Components"); b.Navigation("Orders"); }); modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Component", b => { b.Navigation("BouquetComponents"); }); modelBuilder.Entity("FlowerShopDatabaseImplement.Models.Shop", b => { b.Navigation("Bouquets"); }); #pragma warning restore 612, 618 } } }