50 lines
1.5 KiB
C#
50 lines
1.5 KiB
C#
namespace SlipItIn.Shared.DTOs;
|
|
|
|
public class GameStateDto
|
|
{
|
|
public int GameId { get; set; }
|
|
public string LobbyCode { get; set; } = string.Empty;
|
|
public string Status { get; set; } = string.Empty;
|
|
public List<PlayerInfoDto> Players { get; set; } = [];
|
|
// Host user id to let clients determine whether the current user is the host
|
|
public int HostUserId { get; set; }
|
|
public int CurrentRound { get; set; }
|
|
public int RoundTimeRemaining { get; set; }
|
|
}
|
|
|
|
public class PlayerInfoDto
|
|
{
|
|
// Öffentliche Daten (für alle sichtbar)
|
|
public int PlayerId { get; set; }
|
|
public string Username { get; set; } = string.Empty;
|
|
public int Score { get; set; }
|
|
public bool IsReady { get; set; }
|
|
public int CardCount { get; set; } // Anzahl der Karten (nicht die Karten selbst!)
|
|
}
|
|
|
|
public class PlayerHandDto
|
|
{
|
|
// Private Daten (nur für den Spieler selbst)
|
|
public int PlayerId { get; set; }
|
|
public List<PlayerCardDto> Cards { get; set; } = [];
|
|
}
|
|
|
|
public class PlayerCardDto
|
|
{
|
|
public int CardId { get; set; }
|
|
public int PhraseId { get; set; }
|
|
public string Text { get; set; } = string.Empty;
|
|
public bool IsUsed { get; set; }
|
|
}
|
|
|
|
public class SlipChallengeDto
|
|
{
|
|
public int ChallengeId { get; set; }
|
|
public int ChallengingPlayerId { get; set; }
|
|
public string ChallengingPlayerName { get; set; } = string.Empty;
|
|
public int TargetPlayerId { get; set; }
|
|
public int TargetCardId { get; set; }
|
|
public string Status { get; set; } = string.Empty;
|
|
public DateTime CreatedAt { get; set; }
|
|
}
|