games/packages/service_api/lib/models/unified_rank_dto.dart
2025-11-14 18:03:50 +09:00

31 lines
796 B
Dart

// lib/models/unified_rank_dto.dart
class UnifiedRankDto {
final String userId; // 👈 [수정] 앱-고유 ID
final String gameType;
final String? contextId;
final String playerName;
final int primaryScore;
final int? secondaryScore;
UnifiedRankDto({
required this.userId, // 👈 [수정] 생성자에 추가
required this.gameType,
this.contextId,
required this.playerName,
required this.primaryScore,
this.secondaryScore,
});
// Dart 객체를 JSON으로 변환 (서버 전송용)
Map<String, dynamic> toJson() {
return {
'userId': userId, // 👈 [수정]
'gameType': gameType,
'contextId': contextId,
'playerName': playerName,
'primaryScore': primaryScore,
'secondaryScore': secondaryScore,
};
}
}