//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SQLiteEF;
#nullable disable
namespace API.Migrations
{
[DbContext(typeof(Context))]
[Migration("20250525221352_Initial")]
partial class Initial
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.5");
modelBuilder.Entity("GamePlayer", b =>
{
b.Property("GamesAppId")
.HasColumnType("INTEGER");
b.Property("PlayedBySteamId")
.HasColumnType("INTEGER");
b.HasKey("GamesAppId", "PlayedBySteamId");
b.HasIndex("PlayedBySteamId");
b.ToTable("GamePlayer");
});
modelBuilder.Entity("SQLiteEF.Game", b =>
{
b.Property("AppId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("AppId");
b.ToTable("Games");
});
modelBuilder.Entity("SQLiteEF.Player", b =>
{
b.Property("SteamId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AvatarUrl")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property("ProfileUrl")
.IsRequired()
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.HasKey("SteamId");
b.ToTable("Players");
});
modelBuilder.Entity("SQLiteEF.TrackedTime", b =>
{
b.Property("TimeStamp")
.HasColumnType("TEXT");
b.Property("GameAppId")
.HasColumnType("INTEGER");
b.Property("PlayerSteamId")
.HasColumnType("INTEGER");
b.Property("TimePlayed")
.HasColumnType("INTEGER");
b.HasKey("TimeStamp");
b.HasIndex("GameAppId");
b.HasIndex("PlayerSteamId");
b.ToTable("TrackedTime");
});
modelBuilder.Entity("GamePlayer", b =>
{
b.HasOne("SQLiteEF.Game", null)
.WithMany()
.HasForeignKey("GamesAppId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("SQLiteEF.Player", null)
.WithMany()
.HasForeignKey("PlayedBySteamId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("SQLiteEF.TrackedTime", b =>
{
b.HasOne("SQLiteEF.Game", "Game")
.WithMany("TrackedTimes")
.HasForeignKey("GameAppId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("SQLiteEF.Player", "Player")
.WithMany("TrackedTimes")
.HasForeignKey("PlayerSteamId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Game");
b.Navigation("Player");
});
modelBuilder.Entity("SQLiteEF.Game", b =>
{
b.Navigation("TrackedTimes");
});
modelBuilder.Entity("SQLiteEF.Player", b =>
{
b.Navigation("TrackedTimes");
});
#pragma warning restore 612, 618
}
}
}