import 'package:json_annotation/json_annotation.dart'; import 'UserInfo.dart'; import 'GameInfo.dart'; import 'HouseInfo.dart'; import 'CompetitionInfo.dart'; part 'PlayerInfo.g.dart'; @JsonSerializable() class PlayerInfo { PlayerInfo.empty(); PlayerInfo( this.id, this.houseId, this.userId, this.statusFlag, this.userInfo, this.points, this.gameInfo, this.houseInfo, this.liveTime, this.score, this.rank, this.ranking, this.houseRank, this.video, this.played, this.competitionInfo, this.createTime, this.dataError, this.resultError, this.competitionId, this.startTime, this.endTime); factory PlayerInfo.fromJson(Map json) => _$PlayerInfoFromJson(json); int id; int houseId; //房间id int userId; //用户id int statusFlag; //状态 0加入 1准备 2开始 3结束 6未比赛 UserInfo userInfo; int points; //积分 GameInfo gameInfo; HouseInfo houseInfo; double liveTime; double score; int rank; //名次 int ranking; int houseRank; //房间比赛名次 String video; //视频地址 bool played; CompetitionInfo competitionInfo; int createTime; bool dataError; bool resultError; int competitionId; int startTime; int endTime; Map toJson() => _$PlayerInfoToJson(this); @override String toString() { return _$PlayerInfoToJson(this).toString(); } }