chat_room_games_model.dart 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /// code : "OK"
  2. /// data : {"g_token":"4bgFYEuV94TjAwlI87+PMrfTTRLUWwir1JggN+z+qhvYz4JgcRchmSV5P8MgGNB4OiS92NXbXV5jPTJLFRQGbbj048IMp0feBxnxK9efOhXwt5Ks6FyP7XqGWQrn8lKJ","gameUrl":"http://120.55.180.32:8088/?token=4bgFYEuV94TjAwlI87+PMrfTTRLUWwir1JggN+z+qhvYz4JgcRchmSV5P8MgGNB4OiS92NXbXV5jPTJLFRQGbbj048IMp0feBxnxK9efOhXwt5Ks6FyP7XqGWQrn8lKJ&gameId=489"}
  3. /// msg : ""
  4. /// success : true
  5. class ChatRoomGamesModel {
  6. String? _code;
  7. GameData? _data;
  8. String? _msg;
  9. bool? _success;
  10. String? get code => _code;
  11. GameData? get data => _data;
  12. String? get msg => _msg;
  13. bool? get success => _success;
  14. ChatRoomGamesModel({
  15. String? code,
  16. GameData? data,
  17. String? msg,
  18. bool? success}){
  19. _code = code;
  20. _data = data;
  21. _msg = msg;
  22. _success = success;
  23. }
  24. ChatRoomGamesModel.fromJson(dynamic json) {
  25. _code = json['code'];
  26. _data = json['data'] != null ? GameData.fromJson(json['data']) : null;
  27. _msg = json['msg'];
  28. _success = json['success'];
  29. }
  30. Map<String, dynamic> toJson() {
  31. var map = <String, dynamic>{};
  32. map['code'] = _code;
  33. if (_data != null) {
  34. map['data'] = _data?.toJson();
  35. }
  36. map['msg'] = _msg;
  37. map['success'] = _success;
  38. return map;
  39. }
  40. }
  41. /// g_token : "4bgFYEuV94TjAwlI87+PMrfTTRLUWwir1JggN+z+qhvYz4JgcRchmSV5P8MgGNB4OiS92NXbXV5jPTJLFRQGbbj048IMp0feBxnxK9efOhXwt5Ks6FyP7XqGWQrn8lKJ"
  42. /// gameUrl : "http://120.55.180.32:8088/?token=4bgFYEuV94TjAwlI87+PMrfTTRLUWwir1JggN+z+qhvYz4JgcRchmSV5P8MgGNB4OiS92NXbXV5jPTJLFRQGbbj048IMp0feBxnxK9efOhXwt5Ks6FyP7XqGWQrn8lKJ&gameId=489"
  43. class GameData {
  44. String? _gToken;
  45. String? _gameUrl;
  46. String? get gToken => _gToken;
  47. String? get gameUrl => _gameUrl;
  48. GameData({
  49. String? gToken,
  50. String? gameUrl}){
  51. _gToken = gToken;
  52. _gameUrl = gameUrl;
  53. }
  54. GameData.fromJson(dynamic json) {
  55. _gToken = json['g_token'];
  56. _gameUrl = json['gameUrl'];
  57. }
  58. Map<String, dynamic> toJson() {
  59. var map = <String, dynamic>{};
  60. map['g_token'] = _gToken;
  61. map['gameUrl'] = _gameUrl;
  62. return map;
  63. }
  64. }