toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'starts_at'] = this.startsAt.toUtc().toIso8601String();
json[r'ends_at'] = this.endsAt.toUtc().toIso8601String();
json[r'status'] = this.status;
json[r'total_hp'] = this.totalHp;
json[r'remaining_hp'] = this.remainingHp;
json[r'participant_count'] = this.participantCount;
if (this.endedAt != null) {
json[r'ended_at'] = this.endedAt!.toUtc().toIso8601String();
} else {
json[r'ended_at'] = null;
}
if (this.result != null) {
json[r'result'] = this.result;
} else {
json[r'result'] = null;
}
if (this.rewardsDistributedAt != null) {
json[r'rewards_distributed_at'] =
this.rewardsDistributedAt!.toUtc().toIso8601String();
} else {
json[r'rewards_distributed_at'] = null;
}
return json;
}