Files
Client/lib/api/marianumcloud/talk/getPoll/getPollStateResponse.dart

51 lines
1.3 KiB
Dart

import 'package:json_annotation/json_annotation.dart';
import '../../../apiResponse.dart';
part 'getPollStateResponse.g.dart';
@JsonSerializable(explicitToJson: true)
class GetPollStateResponse extends ApiResponse {
GetPollStateResponseObject data;
GetPollStateResponse(this.data);
factory GetPollStateResponse.fromJson(Map<String, dynamic> json) => _$GetPollStateResponseFromJson(json);
Map<String, dynamic> toJson() => _$GetPollStateResponseToJson(this);
}
@JsonSerializable(explicitToJson: true)
class GetPollStateResponseObject {
int id;
String question;
List<String> options;
dynamic votes;
String actorType;
String actorId;
String actorDisplayName;
int status;
int resultMode;
int maxVotes;
List<int> votedSelf;
int? numVoters;
List<String>? details;
GetPollStateResponseObject(
this.id,
this.question,
this.options,
this.votes,
this.actorType,
this.actorId,
this.actorDisplayName,
this.status,
this.resultMode,
this.maxVotes,
this.votedSelf,
this.numVoters,
this.details);
factory GetPollStateResponseObject.fromJson(Map<String, dynamic> json) => _$GetPollStateResponseObjectFromJson(json);
Map<String, dynamic> toJson() => _$GetPollStateResponseObjectToJson(this);
}