HouseInfo.dart 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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.playerNumber,
  16. this.maxNumber,
  17. this.bonus,
  18. this.houseType,
  19. this.houseLevel,
  20. this.gameHouseId,
  21. this.gameHousePassword,
  22. this.statusFlag);
  23. int id;
  24. int gameId; //游戏ID
  25. int userId; //用户ID
  26. int seasonId; //赛季ID
  27. String houseName; //房间名称
  28. String houseAbstract; //房间描述
  29. String video; //视频
  30. // GameInfo gameInfo; //游戏信息
  31. int playerNumber;//加入人数
  32. int maxNumber; //最大加入人数
  33. int bonus; //奖金
  34. int houseType; //0为个人1为官方
  35. HouseLevel houseLevel;
  36. String gameHouseId; //游戏房间号
  37. String gameHousePassword; //游戏密码
  38. int statusFlag; //状态
  39. factory HouseInfo.fromJson(Map<String, dynamic> json) =>
  40. _$HouseInfoFromJson(json);
  41. Map<String, dynamic> toJson() => _$HouseInfoToJson(this);
  42. // 命名构造函数
  43. HouseInfo.empty();
  44. @override
  45. String toString() {
  46. return _$HouseInfoToJson(this).toString();
  47. }
  48. }