PlayerInfo.dart 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import 'package:json_annotation/json_annotation.dart';
  2. import 'UserInfo.dart';
  3. import 'GameInfo.dart';
  4. import 'HouseInfo.dart';
  5. import 'CompetitionInfo.dart';
  6. part 'PlayerInfo.g.dart';
  7. @JsonSerializable()
  8. class PlayerInfo {
  9. PlayerInfo.empty();
  10. PlayerInfo(
  11. this.id,
  12. this.houseId,
  13. this.userId,
  14. this.statusFlag,
  15. this.userInfo,
  16. this.points,
  17. this.gameInfo,
  18. this.houseInfo,
  19. this.liveTime,
  20. this.score,
  21. this.rank,
  22. this.ranking,
  23. this.houseRank,
  24. this.video,
  25. this.played,
  26. this.competitionInfo,
  27. this.createTime,
  28. this.dataError,
  29. this.resultError,
  30. this.competitionId,
  31. this.startTime,
  32. this.endTime);
  33. factory PlayerInfo.fromJson(Map<String, dynamic> json) => _$PlayerInfoFromJson(json);
  34. int id;
  35. int houseId; //房间id
  36. int userId; //用户id
  37. int statusFlag; //状态 0加入 1准备 2开始 3结束 6未比赛
  38. UserInfo userInfo;
  39. int points; //积分
  40. GameInfo gameInfo;
  41. HouseInfo houseInfo;
  42. double liveTime;
  43. double score;
  44. int rank; //名次
  45. int ranking;
  46. int houseRank; //房间比赛名次
  47. String video; //视频地址
  48. bool played;
  49. CompetitionInfo competitionInfo;
  50. int createTime;
  51. bool dataError;
  52. bool resultError;
  53. int competitionId;
  54. int startTime;
  55. int endTime;
  56. Map<String, dynamic> toJson() => _$PlayerInfoToJson(this);
  57. @override
  58. String toString() {
  59. return _$PlayerInfoToJson(this).toString();
  60. }
  61. }