This commit is contained in:
2025-05-26 01:44:26 +02:00
parent ebddd3c3ed
commit 1a08f932af
23 changed files with 526 additions and 256 deletions

View File

@ -1,12 +1,13 @@
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
namespace SQLiteEF;
[PrimaryKey("TimeStamp")]
public class TrackedTime
{
public Game Game { get; init; }
public Player Player { get; init; }
[JsonIgnore] public Game Game { get; init; }
[JsonIgnore] public Player Player { get; init; }
public DateTime TimeStamp { get; init; }
public ulong TimePlayed { get; init; }
@ -14,7 +15,7 @@ public class TrackedTime
{
this.Game = game;
this.Player = player;
this.TimeStamp = timeStamp??DateTime.Now;
this.TimeStamp = timeStamp??DateTime.UtcNow;
this.TimePlayed = timePlayed;
}