HouseInfo.dart 1.7 KB

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