You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Dotnet-WebAPI/AppContext/Migrations/AppContextModelSnapshot.cs

219 lines
7.0 KiB

// <auto-generated />
using System;
using AppContext;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace AppContext.Migrations
{
[DbContext(typeof(AppContext))]
partial class AppContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.0");
modelBuilder.Entity("AppContext.Entities.MemberEntity", b =>
{
b.Property<int>("UserId")
.HasColumnType("INTEGER");
b.Property<int>("TeamId")
.HasColumnType("INTEGER");
b.Property<string>("Role")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("UserId", "TeamId");
b.HasIndex("TeamId");
b.ToTable("Members");
});
modelBuilder.Entity("AppContext.Entities.TacticEntity", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime>("CreationDate")
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("OwnerId")
.HasColumnType("INTEGER");
b.Property<int>("Type")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("OwnerId");
b.ToTable("Tactics");
});
modelBuilder.Entity("AppContext.Entities.TacticStepEntity", b =>
{
b.Property<int>("TacticId")
.HasColumnType("INTEGER");
b.Property<int>("StepId")
.HasColumnType("INTEGER");
b.Property<string>("JsonContent")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int?>("ParentId")
.HasColumnType("INTEGER");
b.Property<int?>("ParentStepId")
.HasColumnType("INTEGER");
b.Property<int?>("ParentTacticId")
.HasColumnType("INTEGER");
b.HasKey("TacticId", "StepId");
b.HasIndex("ParentTacticId", "ParentStepId");
b.ToTable("TacticSteps");
});
modelBuilder.Entity("AppContext.Entities.TeamEntity", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("MainColor")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Picture")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("SecondColor")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Teams");
});
modelBuilder.Entity("AppContext.Entities.UserEntity", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("TEXT");
b.Property<bool>("IsAdmin")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("ProfilePicture")
.IsRequired()
.HasColumnType("TEXT");
b.Property<byte[]>("Salt")
.IsRequired()
.HasColumnType("BLOB");
b.HasKey("Id");
b.ToTable("Users");
});
modelBuilder.Entity("AppContext.Entities.MemberEntity", b =>
{
b.HasOne("AppContext.Entities.TeamEntity", "Team")
.WithMany("Members")
.HasForeignKey("TeamId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("AppContext.Entities.UserEntity", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Team");
b.Navigation("User");
});
modelBuilder.Entity("AppContext.Entities.TacticEntity", b =>
{
b.HasOne("AppContext.Entities.UserEntity", "Owner")
.WithMany("Tactics")
.HasForeignKey("OwnerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Owner");
});
modelBuilder.Entity("AppContext.Entities.TacticStepEntity", b =>
{
b.HasOne("AppContext.Entities.TacticEntity", "Tactic")
.WithMany()
.HasForeignKey("TacticId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("AppContext.Entities.TacticStepEntity", "Parent")
.WithMany("Children")
.HasForeignKey("ParentTacticId", "ParentStepId");
b.Navigation("Parent");
b.Navigation("Tactic");
});
modelBuilder.Entity("AppContext.Entities.TacticStepEntity", b =>
{
b.Navigation("Children");
});
modelBuilder.Entity("AppContext.Entities.TeamEntity", b =>
{
b.Navigation("Members");
});
modelBuilder.Entity("AppContext.Entities.UserEntity", b =>
{
b.Navigation("Tactics");
});
#pragma warning restore 612, 618
}
}
}