- Neues Backend-Projekt mit Entity Framework Core (PostgreSQL) und geteilten Modellen/DTOs angelegt - Datenbankstruktur und Migrations implementiert (User, Game, Player, Phrase, PlayerCard, GameRound, SlipChallenge) - SignalR-Hub für Spielkommunikation (Lobby, Spielstart, Kartenvergabe, Slip/Challenge) hinzugefügt - Spiellogik und DB-Zugriffe im GameService gekapselt - JWT-Authentifizierung und CORS für Entwicklung konfiguriert - Projektdateien, NuGet-Abhängigkeiten und .gitignore aktualisiert - Startkonfiguration und Umgebungsdateien angepasst
20 lines
648 B
C#
20 lines
648 B
C#
namespace SlipItIn.Shared.Models;
|
|
|
|
public class Player
|
|
{
|
|
public int Id { get; set; }
|
|
public int UserId { get; set; }
|
|
public int GameId { get; set; }
|
|
public int Score { get; set; } = 0;
|
|
public int SuccessfulSlips { get; set; } = 0;
|
|
public int FailedSlips { get; set; } = 0;
|
|
public DateTime JoinedAt { get; set; } = DateTime.UtcNow;
|
|
public bool IsReady { get; set; } = false;
|
|
public string? ConnectionId { get; set; } // SignalR-Verbindungs-ID
|
|
|
|
// Navigation
|
|
public User User { get; set; } = null!;
|
|
public Game Game { get; set; } = null!;
|
|
public ICollection<PlayerCard> Cards { get; set; } = [];
|
|
}
|