ParticipatingInfo.dart 753 B

12345678910111213141516171819202122232425262728
  1. import 'package:json_annotation/json_annotation.dart';
  2. import 'package:wanna_battle/model/UserInfo.dart';
  3. part 'ParticipatingInfo.g.dart';
  4. @JsonSerializable()
  5. class ParticipatingInfo {
  6. ParticipatingInfo.empty();
  7. ParticipatingInfo(this.userId, this.competitionId, this.points, this.bonus, this.received, this.rank, this.currentRank, this.userInfo);
  8. factory ParticipatingInfo.fromJson(Map<String, dynamic> json) => _$ParticipatingInfoFromJson(json);
  9. int userId;
  10. int competitionId;
  11. int points;
  12. int bonus;
  13. int received;
  14. int rank;
  15. int currentRank;
  16. UserInfo userInfo;
  17. Map<String, dynamic> toJson() => _$ParticipatingInfoToJson(this);
  18. @override
  19. String toString() {
  20. return _$ParticipatingInfoToJson(this).toString();
  21. }
  22. }