easyeat/backend/API/Migrations/20250428070005_RecipeModelAdded.Designer.cs
2025-04-28 09:00:30 +02:00

166 lines
5.4 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("20250428070005_RecipeModelAdded")]
partial class RecipeModelAdded
{
/// <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>("Element")
.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.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.UserModels.User", b =>
{
b.HasOne("API.Models.RecipeModels.PrefereredRecipes", "PrefereredRecipes")
.WithMany()
.HasForeignKey("PrefereredRecipesId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("PrefereredRecipes");
});
modelBuilder.Entity("API.Models.RecipeModels.PrefereredRecipes", b =>
{
b.Navigation("Recipes");
});
modelBuilder.Entity("API.Models.RecipeModels.Recipe", b =>
{
b.Navigation("Ingredients");
});
#pragma warning restore 612, 618
}
}
}