//
using System;
using EntityFrameWorkLib;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace EntityFrameWorkLib.Migrations
{
[DbContext(typeof(TrekContext))]
partial class TrekContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
modelBuilder.Entity("EntityFrameWorkLib.CaseEntity", b =>
{
b.Property("CaseId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Value")
.HasColumnType("INTEGER");
b.HasKey("CaseId");
b.ToTable("Case");
});
modelBuilder.Entity("EntityFrameWorkLib.GameEntity", b =>
{
b.Property("GameId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Date")
.HasColumnType("TEXT");
b.Property("Duration")
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property("NbPlayers")
.HasColumnType("INTEGER");
b.HasKey("GameId");
b.ToTable("Game");
});
modelBuilder.Entity("EntityFrameWorkLib.GrilleEntity", b =>
{
b.Property("GrilleId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("MaxChain")
.HasColumnType("INTEGER");
b.Property("MaxZone")
.HasColumnType("INTEGER");
b.Property("NbChains")
.HasColumnType("INTEGER");
b.Property("NbZones")
.HasColumnType("INTEGER");
b.HasKey("GrilleId");
b.ToTable("Grille");
});
modelBuilder.Entity("EntityFrameWorkLib.PlayerEntity", b =>
{
b.Property("PlayerId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("MaxPoints")
.HasColumnType("INTEGER");
b.Property("MaxZone")
.HasColumnType("INTEGER");
b.Property("NbPlayed")
.HasColumnType("INTEGER");
b.Property("NbPoints")
.HasColumnType("INTEGER");
b.Property("NbWin")
.HasColumnType("INTEGER");
b.Property("Pseudo")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("PlayerId");
b.ToTable("Players");
});
modelBuilder.Entity("EntityFrameWorkLib.ScoreEntity", b =>
{
b.Property("ScoreId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("GameId")
.HasColumnType("INTEGER");
b.Property("NbPoints")
.HasColumnType("INTEGER");
b.Property("PlayerId")
.HasColumnType("INTEGER");
b.HasKey("ScoreId");
b.HasIndex("GameId");
b.HasIndex("PlayerId");
b.ToTable("Score");
});
modelBuilder.Entity("EntityFrameWorkLib.TurnEntity", b =>
{
b.Property("TurnId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("DiceValue1")
.HasColumnType("INTEGER");
b.Property("DiceValue2")
.HasColumnType("INTEGER");
b.HasKey("TurnId");
b.ToTable("Turn");
});
modelBuilder.Entity("EntityFrameWorkLib.ScoreEntity", b =>
{
b.HasOne("EntityFrameWorkLib.GameEntity", "Game")
.WithMany()
.HasForeignKey("GameId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("EntityFrameWorkLib.PlayerEntity", "Player")
.WithMany()
.HasForeignKey("PlayerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Game");
b.Navigation("Player");
});
#pragma warning restore 612, 618
}
}
}