HouseInfo.dart 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. int id;
  28. int gameId; //游戏ID
  29. int userId; //用户ID
  30. int seasonId; //赛季ID
  31. String houseName; //房间名称
  32. String houseAbstract; //房间描述
  33. String video; //视频
  34. GameInfo gameInfo; //游戏信息
  35. int playerNumber; //加入人数
  36. int maxNumber; //最大加入人数
  37. int bonus; //奖金
  38. int houseType; //0为个人1为官方
  39. HouseLevel houseLevel;
  40. String gameHouseId; //游戏房间号
  41. String gameHousePassword; //游戏密码
  42. int statusFlag; //状态
  43. String createUser; //创建人
  44. int beginTime; //开始时间
  45. int createTime;//创建时间
  46. factory HouseInfo.fromJson(Map<String, dynamic> json) =>
  47. _$HouseInfoFromJson(json);
  48. Map<String, dynamic> toJson() => _$HouseInfoToJson(this);
  49. // 命名构造函数
  50. HouseInfo.empty();
  51. @override
  52. String toString() {
  53. return _$HouseInfoToJson(this).toString();
  54. }
  55. }