easyeat/backend/API/Migrations/20250430092324_PreferedRecipesisnullable.Designer.cs
2025-04-30 11:36:05 +02:00

206 lines
6.7 KiB
C#

// <auto-generated />
using System;
using API.DBAccess;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace API.Migrations
{
[DbContext(typeof(DBContext))]
[Migration("20250430092324_PreferedRecipesisnullable")]
partial class PreferedRecipesisnullable
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.10")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("API.Models.RecipeModels.Ingredient", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property<int>("Amount")
.HasColumnType("int");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property<int?>("RecipeId")
.HasColumnType("int");
b.Property<string>("Unit")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.HasIndex("RecipeId");
b.ToTable("Ingredient");
});
modelBuilder.Entity("API.Models.RecipeModels.PrefereredRecipes", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("PrefereredRecipes");
});
modelBuilder.Entity("API.Models.RecipeModels.Recipe", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Directions")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property<int?>("PrefereredRecipesId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("PrefereredRecipesId");
b.ToTable("Recipes");
});
modelBuilder.Entity("API.Models.ShoppingListModels.ShoppingList", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property<double>("Amount")
.HasColumnType("double");
b.Property<bool>("Checked")
.HasColumnType("tinyint(1)");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Unit")
.IsRequired()
.HasColumnType("longtext");
b.Property<int?>("UserId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("ShoppingList");
});
modelBuilder.Entity("API.Models.UserModels.User", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("longtext");
b.Property<int?>("PrefereredRecipesId")
.HasColumnType("int");
b.Property<string>("RefreshToken")
.HasColumnType("longtext");
b.Property<DateTime>("RefreshTokenExpireAt")
.HasColumnType("datetime(6)");
b.Property<string>("Salt")
.HasColumnType("longtext");
b.Property<string>("UserName")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("Id");
b.HasIndex("PrefereredRecipesId");
b.ToTable("Users");
});
modelBuilder.Entity("API.Models.RecipeModels.Ingredient", b =>
{
b.HasOne("API.Models.RecipeModels.Recipe", null)
.WithMany("Ingredients")
.HasForeignKey("RecipeId");
});
modelBuilder.Entity("API.Models.RecipeModels.Recipe", b =>
{
b.HasOne("API.Models.RecipeModels.PrefereredRecipes", null)
.WithMany("Recipes")
.HasForeignKey("PrefereredRecipesId");
});
modelBuilder.Entity("API.Models.ShoppingListModels.ShoppingList", b =>
{
b.HasOne("API.Models.UserModels.User", null)
.WithMany("ShoppingList")
.HasForeignKey("UserId");
});
modelBuilder.Entity("API.Models.UserModels.User", b =>
{
b.HasOne("API.Models.RecipeModels.PrefereredRecipes", "PrefereredRecipes")
.WithMany()
.HasForeignKey("PrefereredRecipesId");
b.Navigation("PrefereredRecipes");
});
modelBuilder.Entity("API.Models.RecipeModels.PrefereredRecipes", b =>
{
b.Navigation("Recipes");
});
modelBuilder.Entity("API.Models.RecipeModels.Recipe", b =>
{
b.Navigation("Ingredients");
});
modelBuilder.Entity("API.Models.UserModels.User", b =>
{
b.Navigation("ShoppingList");
});
#pragma warning restore 612, 618
}
}
}