added functionality to show own votes in polls
This commit is contained in:
50
lib/api/marianumcloud/talk/getPoll/getPollStateResponse.dart
Normal file
50
lib/api/marianumcloud/talk/getPoll/getPollStateResponse.dart
Normal file
@@ -0,0 +1,50 @@
|
||||
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);
|
||||
}
|
Reference in New Issue
Block a user