155 lines
4.8 KiB
C#
155 lines
4.8 KiB
C#
// <auto-generated />
|
|
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("20250526144942_Game-Logo-and-Icon")]
|
|
partial class GameLogoandIcon
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "9.0.5");
|
|
|
|
modelBuilder.Entity("GamePlayer", b =>
|
|
{
|
|
b.Property<ulong>("GamesAppId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<ulong>("PlayedBySteamId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("GamesAppId", "PlayedBySteamId");
|
|
|
|
b.HasIndex("PlayedBySteamId");
|
|
|
|
b.ToTable("GamePlayer");
|
|
});
|
|
|
|
modelBuilder.Entity("SQLiteEF.Game", b =>
|
|
{
|
|
b.Property<ulong>("AppId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("IconUrl")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("LogoUrl")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("AppId");
|
|
|
|
b.ToTable("Games");
|
|
});
|
|
|
|
modelBuilder.Entity("SQLiteEF.Player", b =>
|
|
{
|
|
b.Property<ulong>("SteamId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("AvatarUrl")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ProfileUrl")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("SteamId");
|
|
|
|
b.ToTable("Players");
|
|
});
|
|
|
|
modelBuilder.Entity("SQLiteEF.TrackedTime", b =>
|
|
{
|
|
b.Property<DateTime>("TimeStamp")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<ulong>("GameAppId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<ulong>("PlayerSteamId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<ulong>("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
|
|
}
|
|
}
|
|
}
|