slrpg-app/lib/src/features/multiplayer/domain/entities/party.dart
Patryk Hegenberg a2067b5f9b feat: add multiplayer workout
Added a lobbyScreen to generate a unique Code and invite other Players
and the possibility to workout together, by using the pocketbase
realtime feature.
2026-01-13 07:56:08 +01:00

18 lines
555 B
Dart

import 'package:freezed_annotation/freezed_annotation.dart';
part 'party.freezed.dart';
part 'party.g.dart';
@freezed
abstract class Party with _$Party {
const factory Party({
required String id,
required String code,
@JsonKey(name: 'host_id') required String hostId,
required String status, // 'waiting', 'active', 'finished'
@Default(0) @JsonKey(name: 'current_hp') int currentHp,
@Default(0) @JsonKey(name: 'max_hp') int maxHp,
}) = _Party;
factory Party.fromJson(Map<String, dynamic> json) => _$PartyFromJson(json);
}