Backend für "Slip It In" mit ASP.NET Core erstellt
- 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
This commit is contained in:
24
SlipItIn.Shared/Models/GameRound.cs
Normal file
24
SlipItIn.Shared/Models/GameRound.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
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; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user