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);
}
