HouseInfo.dart 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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);
  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; //评分类型
  49. factory HouseInfo.fromJson(Map<String, dynamic> json) =>
  50. _$HouseInfoFromJson(json);
  51. Map<String, dynamic> toJson() => _$HouseInfoToJson(this);
  52. // 命名构造函数
  53. HouseInfo.empty();
  54. @override
  55. String toString() {
  56. return _$HouseInfoToJson(this).toString();
  57. }
  58. }