Working
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user