// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using StubContext; #nullable disable namespace StubContext.Migrations { [DbContext(typeof(StubAppContext))] [Migration("20240212203956_m1")] partial class m1 { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "8.0.0"); modelBuilder.Entity("AppContext.Entities.MemberEntity", b => { b.Property("TeamId") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("INTEGER"); b.Property("Role") .IsRequired() .HasColumnType("TEXT"); b.HasKey("TeamId", "UserId"); b.HasIndex("UserId"); b.ToTable("Members"); }); modelBuilder.Entity("AppContext.Entities.TacticEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("JsonContent") .IsRequired() .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("OwnerId") .HasColumnType("INTEGER"); b.Property("Type") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("OwnerId"); b.ToTable("Tactics"); }); modelBuilder.Entity("AppContext.Entities.TeamEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("MainColor") .IsRequired() .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("Picture") .IsRequired() .HasColumnType("TEXT"); b.Property("SecondColor") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Teams"); }); modelBuilder.Entity("AppContext.Entities.UserEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Email") .IsRequired() .HasColumnType("TEXT"); b.Property("IsAdmin") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("Password") .IsRequired() .HasColumnType("TEXT"); b.Property("ProfilePicture") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Users"); b.HasData( new { Id = 1, Email = "maxime@mail.com", IsAdmin = true, Name = "maxime", Password = "Abq2gmly3eYK29oU+krGTUfRH2MAka//xH4nqbZV1Ak=", ProfilePicture = "https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_960_720.png" }, new { Id = 2, Email = "mael@mail.com", IsAdmin = true, Name = "mael", Password = "b4IE5XGndyILJn/ZgMdX9YH+rcux1Rvp9X4adjzXzto=", ProfilePicture = "https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_960_720.png" }, new { Id = 3, Email = "yanis@mail.com", IsAdmin = true, Name = "yanis", Password = "XZOJugDxViwhvojERZCWfwocYdwICNTyl8VwNZjdVdM=", ProfilePicture = "https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_960_720.png" }, new { Id = 4, Email = "simon@mail.com", IsAdmin = true, Name = "simon", Password = "FzsWErXcFnZrRwgY6j18tXdFzq+Jm+jmYKeOTFVMy68=", ProfilePicture = "https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_960_720.png" }, new { Id = 5, Email = "vivien@mail.com", IsAdmin = true, Name = "vivien", Password = "6oIi8obqxLNGf1UdE6dFVbffc/+z93AoZiZieibD5vM=", ProfilePicture = "https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_960_720.png" }); }); 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.TeamEntity", b => { b.Navigation("Members"); }); modelBuilder.Entity("AppContext.Entities.UserEntity", b => { b.Navigation("Tactics"); }); #pragma warning restore 612, 618 } } }