HouseInfo.dart 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. HouseLevel houseLevel;
  41. String gameHouseId; //游戏房间号
  42. String gameHousePassword; //游戏密码
  43. int statusFlag; //状态
  44. String createUser; //创建人
  45. int beginTime; //开始时间
  46. int createTime;//创建时间
  47. int scoreType;//评分类型
  48. factory HouseInfo.fromJson(Map<String, dynamic> json) =>
  49. _$HouseInfoFromJson(json);
  50. Map<String, dynamic> toJson() => _$HouseInfoToJson(this);
  51. // 命名构造函数
  52. HouseInfo.empty();
  53. @override
  54. String toString() {
  55. return _$HouseInfoToJson(this).toString();
  56. }
  57. }