- 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
25 lines
626 B
C#
25 lines
626 B
C#
namespace SlipItIn.Shared.Models;
|
|
|
|
public enum RoundStatus
|
|
{
|
|
Waiting,
|
|
Active,
|
|
Resolving,
|
|
Completed
|
|
}
|
|
|
|
public class GameRound
|
|
{
|
|
public int Id { get; set; }
|
|
public int GameId { get; set; }
|
|
public int RoundNumber { get; set; }
|
|
public RoundStatus Status { get; set; } = RoundStatus.Waiting;
|
|
public DateTime StartedAt { get; set; } = DateTime.UtcNow;
|
|
public DateTime? EndedAt { get; set; }
|
|
|
|
// Navigation
|
|
public Game Game { get; set; } = null!;
|
|
public ICollection<PlayerCard> ActiveCards { get; set; } = [];
|
|
public ICollection<SlipChallenge> Challenges { get; set; } = [];
|
|
}
|