BindGameInfo.dart 656 B

123456789101112131415161718192021222324
  1. import 'package:json_annotation/json_annotation.dart';
  2. import 'GameInfo.dart';
  3. part 'BindGameInfo.g.dart';
  4. @JsonSerializable()
  5. class BindGameInfo {
  6. BindGameInfo(this.id, this.gameId, this.userId, this.nickName,this.gameInfo);
  7. int id;
  8. int gameId;//游戏ID
  9. int userId;//用户ID
  10. String nickName;//用户昵称
  11. GameInfo gameInfo;//游戏信息
  12. factory BindGameInfo.fromJson(Map<String, dynamic> json) =>
  13. _$BindGameInfoFromJson(json);
  14. Map<String, dynamic> toJson() => _$BindGameInfoToJson(this);
  15. // 命名构造函数
  16. BindGameInfo.empty();
  17. @override
  18. String toString() {
  19. return _$BindGameInfoToJson(this).toString();
  20. }
  21. }