// using System; using Francesco.Recipes.World.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace Francesco.Recipes.World.Migrations { [DbContext(typeof(FrancescosRecipesWorldDbContext))] partial class FrancescosRecipesWorldDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.11") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("Francesco.Recipes.World.Models.BackendModels.Category.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Categories"); }); modelBuilder.Entity("Francesco.Recipes.World.Models.BackendModels.Ingredient.Ingredient", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Quantity") .HasColumnType("int"); b.Property("UnitId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); b.HasIndex("UnitId"); b.ToTable("Ingredients"); }); modelBuilder.Entity("Francesco.Recipes.World.Models.BackendModels.Instruction.Instruction", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Description") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Number") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RecipeId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); b.HasIndex("RecipeId"); b.ToTable("Instructions"); }); modelBuilder.Entity("Francesco.Recipes.World.Models.BackendModels.Recipe.Recipe", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("CategoryId") .HasColumnType("uniqueidentifier"); b.Property("CookingTime") .HasColumnType("time"); b.Property("Description") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Difficulty") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("PreparationTime") .HasColumnType("time"); b.Property("Servings") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("CategoryId"); b.ToTable("Recipes"); }); modelBuilder.Entity("Francesco.Recipes.World.Models.BackendModels.RecipeIngredient.RecipeIngredient", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("IngredientId") .HasColumnType("uniqueidentifier"); b.Property("RecipeId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); b.HasIndex("IngredientId"); b.HasIndex("RecipeId"); b.ToTable("RecipeIngredients"); }); modelBuilder.Entity("Francesco.Recipes.World.Models.BackendModels.Unit.Unit", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Unit"); }); modelBuilder.Entity("Francesco.Recipes.World.Models.BackendModels.Ingredient.Ingredient", b => { b.HasOne("Francesco.Recipes.World.Models.BackendModels.Unit.Unit", "Unit") .WithMany("Recipes") .HasForeignKey("UnitId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Unit"); }); modelBuilder.Entity("Francesco.Recipes.World.Models.BackendModels.Instruction.Instruction", b => { b.HasOne("Francesco.Recipes.World.Models.BackendModels.Recipe.Recipe", "Recipe") .WithMany("Instructions") .HasForeignKey("RecipeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Recipe"); }); modelBuilder.Entity("Francesco.Recipes.World.Models.BackendModels.Recipe.Recipe", b => { b.HasOne("Francesco.Recipes.World.Models.BackendModels.Category.Category", null) .WithMany("Recipes") .HasForeignKey("CategoryId"); }); modelBuilder.Entity("Francesco.Recipes.World.Models.BackendModels.RecipeIngredient.RecipeIngredient", b => { b.HasOne("Francesco.Recipes.World.Models.BackendModels.Ingredient.Ingredient", "Ingredient") .WithMany() .HasForeignKey("IngredientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Francesco.Recipes.World.Models.BackendModels.Recipe.Recipe", "Recipe") .WithMany("RecipeIngredients") .HasForeignKey("RecipeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Ingredient"); b.Navigation("Recipe"); }); modelBuilder.Entity("Francesco.Recipes.World.Models.BackendModels.Category.Category", b => { b.Navigation("Recipes"); }); modelBuilder.Entity("Francesco.Recipes.World.Models.BackendModels.Recipe.Recipe", b => { b.Navigation("Instructions"); b.Navigation("RecipeIngredients"); }); modelBuilder.Entity("Francesco.Recipes.World.Models.BackendModels.Unit.Unit", b => { b.Navigation("Recipes"); }); #pragma warning restore 612, 618 } } }