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.
246 lines
8.2 KiB
246 lines
8.2 KiB
// <auto-generated />
|
|
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<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Character");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity.Images", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("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<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("AnswerA")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("AnswerB")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("AnswerC")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("AnswerD")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("CorrectAnswer")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Text")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Question");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity.Quiz", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("NbQuestion")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Quiz");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity.Quote", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool>("IsValid")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<int>("Langage")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("Likes")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Quote");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity.Source", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("Year")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Source");
|
|
});
|
|
|
|
modelBuilder.Entity("Entity.Users", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("Created")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("IdImage")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Password")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("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
|
|
}
|
|
}
|
|
}
|