//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using StubbedContextLib;
#nullable disable
namespace StubbedContextLib.Migrations
{
[DbContext(typeof(StubWTFContext))]
[Migration("20250312160314_myFirstMigration")]
partial class myFirstMigration
{
///
protected override void BuildTargetModel(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");
});
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("Password")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("UserName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Users");
b.HasData(
new
{
Id = 1,
Created = new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Email = "dev@gmail.com",
Password = "1234",
UserName = "Dev"
});
});
#pragma warning restore 612, 618
}
}
}