// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using StubbedContextLib; #nullable disable namespace StubbedContextLib.Migrations { [DbContext(typeof(StubWTFContext))] partial class StubWTFContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "9.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("Entity.Character", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Character"); }); modelBuilder.Entity("Entity.Images", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ImgPath") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Images"); b.HasData( new { Id = 1, ImgPath = "coucou" }, new { Id = 2, ImgPath = "bonjour" }); }); modelBuilder.Entity("Entity.Question", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("AnswerA") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("AnswerB") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("AnswerC") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("AnswerD") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("CorrectAnswer") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Text") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Question"); }); modelBuilder.Entity("Entity.Quiz", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("NbQuestion") .HasColumnType("int"); b.Property("Title") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Quiz"); }); modelBuilder.Entity("Entity.Quote", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Content") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("IsValid") .HasColumnType("bit"); b.Property("Langage") .HasColumnType("int"); b.Property("Likes") .HasColumnType("int"); b.HasKey("Id"); b.ToTable("Quote"); }); modelBuilder.Entity("Entity.Source", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Title") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Year") .HasColumnType("int"); b.HasKey("Id"); b.ToTable("Source"); }); modelBuilder.Entity("Entity.Users", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Created") .HasColumnType("datetime2"); b.Property("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("IdImage") .HasColumnType("int"); b.Property("Password") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("UserName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("IdImage"); b.ToTable("Users"); b.HasData( new { Id = 1, Created = new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), Email = "dev@gmail.com", IdImage = 1, Password = "1234", UserName = "Dev" }, new { Id = 2, Created = new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), Email = "admin@gmail.com", IdImage = 1, Password = "1234", UserName = "Admin" }); }); modelBuilder.Entity("Entity.Users", b => { b.HasOne("Entity.Images", "Images") .WithMany("Users") .HasForeignKey("IdImage") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Images"); }); modelBuilder.Entity("Entity.Images", b => { b.Navigation("Users"); }); #pragma warning restore 612, 618 } } }