HouseInfo.dart 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import 'package:json_annotation/json_annotation.dart';
  2. import 'GameInfo.dart';
  3. import 'HouseLevel.dart';
  4. part 'HouseInfo.g.dart';
  5. @JsonSerializable()
  6. class HouseInfo {
  7. HouseInfo(
  8. this.id,
  9. this.gameId,
  10. this.userId,
  11. this.seasonId,
  12. this.houseName,
  13. this.houseAbstract,
  14. this.video,
  15. this.gameInfo,
  16. this.playerNumber,
  17. this.maxNumber,
  18. this.bonus,
  19. this.houseType,
  20. this.houseLevel,
  21. this.gameHouseId,
  22. this.gameHousePassword,
  23. this.statusFlag,
  24. this.createUser,
  25. this.beginTime,
  26. this.createTime,
  27. this.scoreType,this.houseCode);
  28. int id;
  29. int gameId; //游戏ID
  30. int userId; //用户ID
  31. int seasonId; //赛季ID
  32. String houseName; //房间名称
  33. String houseAbstract; //房间描述
  34. String video; //视频
  35. GameInfo gameInfo; //游戏信息
  36. int playerNumber; //加入人数
  37. int maxNumber; //最大加入人数
  38. int bonus; //奖金
  39. int houseType; //0为个人1为官方
  40. @JsonKey(name: 'houseLevelInfo')
  41. HouseLevel houseLevel;
  42. String gameHouseId; //游戏房间号
  43. String gameHousePassword; //游戏密码
  44. int statusFlag; //状态
  45. String createUser; //创建人
  46. int beginTime; //开始时间
  47. int createTime;//创建时间
  48. int scoreType;//评分类型 0.评分 1.吃鸡
  49. String houseCode;//房间号
  50. factory HouseInfo.fromJson(Map<String, dynamic> json) =>
  51. _$HouseInfoFromJson(json);
  52. Map<String, dynamic> toJson() => _$HouseInfoToJson(this);
  53. // 命名构造函数
  54. HouseInfo.empty();
  55. @override
  56. String toString() {
  57. return _$HouseInfoToJson(this).toString();
  58. }
  59. }