BindGameInfo.dart 655 B

1234567891011121314151617181920212223
  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. factory BindGameInfo.fromJson(Map<String, dynamic> json) => _$BindGameInfoFromJson(json);
  8. BindGameInfo.empty();
  9. int id;
  10. int gameId; //游戏ID
  11. int userId; //用户ID
  12. String nickName; //用户昵称
  13. GameInfo gameInfo; //游戏信息
  14. Map<String, dynamic> toJson() => _$BindGameInfoToJson(this);
  15. // 命名构造函数
  16. @override
  17. String toString() {
  18. return _$BindGameInfoToJson(this).toString();
  19. }
  20. }