using Microsoft.EntityFrameworkCore; namespace SQLiteEF; [PrimaryKey("SteamId")] public class Player : IUpdateable { public ulong SteamId { get; init; } public string Name { get; set; } public string ProfileUrl { get; set; } public string AvatarUrl { get; set; } public ICollection Games { get; init; } = null!; public ICollection TrackedTimes { get; init; } = null!; public DateTime UpdatedAt { get; set; } = DateTime.Now; public Player(ulong steamid, string name, string profileUrl, string avatarUrl) { this.SteamId = steamid; this.Name = name; this.ProfileUrl = profileUrl; this.AvatarUrl = avatarUrl; this.Games = []; this.TrackedTimes = []; } /// /// EF CORE /// internal Player(ulong steamid, string name, string profileUrl, string avatarUrl, DateTime updatedAt) { this.SteamId = steamid; this.Name = name; this.ProfileUrl = profileUrl; this.AvatarUrl = avatarUrl; this.UpdatedAt = updatedAt; } }