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,4 +1,5 @@
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
namespace SQLiteEF;
@ -10,13 +11,13 @@ public class Player : IUpdateable
public string ProfileUrl { get; set; }
public string AvatarUrl { get; set; }
public ICollection<Game> Games { get; init; } = null!;
public ICollection<TrackedTime> TrackedTimes { get; init; } = null!;
public DateTime UpdatedAt { get; set; } = DateTime.Now;
[JsonIgnore] public ICollection<Game> Games { get; init; } = null!;
[JsonIgnore] public ICollection<TrackedTime> TrackedTimes { get; init; } = null!;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public Player(ulong steamid, string name, string profileUrl, string avatarUrl)
public Player(ulong steamId, string name, string profileUrl, string avatarUrl)
{
this.SteamId = steamid;
this.SteamId = steamId;
this.Name = name;
this.ProfileUrl = profileUrl;
this.AvatarUrl = avatarUrl;
@ -27,9 +28,9 @@ public class Player : IUpdateable
/// <summary>
/// EF CORE
/// </summary>
internal Player(ulong steamid, string name, string profileUrl, string avatarUrl, DateTime updatedAt)
internal Player(ulong steamId, string name, string profileUrl, string avatarUrl, DateTime updatedAt)
{
this.SteamId = steamid;
this.SteamId = steamId;
this.Name = name;
this.ProfileUrl = profileUrl;
this.AvatarUrl = avatarUrl;