class ShopIndex { Shop? shop; List? items; ShopUser? user; ShopIndex({this.shop, this.items, this.user}); ShopIndex.fromJson(Map json) { print(json); shop = json['shop'] != null ? new Shop.fromJson(json['shop']) : null; if (json['items'] != null) { items =[]; json['items'].forEach((v) { items!.add(new Items.fromJson(v)); }); } user = json['user'] != null ? new ShopUser.fromJson(json['user']) : null; } Map toJson() { final Map data = new Map(); if (this.shop != null) { data['shop'] = this.shop!.toJson(); } if (this.items != null) { data['items'] = this.items!.map((v) => v.toJson()).toList(); } if (this.user != null) { data['user'] = this.user!.toJson(); } return data; } } class Shop { int? id; int? gameId; String? name; String? type; Shop({this.id, this.gameId, this.name, this.type}); Shop.fromJson(Map json) { id = json['id']; gameId = json['game_id']; name = json['name']; type = json['type']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['game_id'] = this.gameId; data['name'] = this.name; data['type'] = this.type; return data; } } class Items { int? id; int? shopId; int? gameId; String? name; String? logo; int? price; String? detail; int? valid; Items( {this.id, this.shopId, this.gameId, this.name, this.logo, this.price, this.detail, this.valid}); Items.fromJson(Map json) { id = json['id']; shopId = json['shop_id']; gameId = json['game_id']; name = json['name']; logo = json['logo']; price = json['price']; detail = json['detail']; valid = json['valid']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['shop_id'] = this.shopId; data['game_id'] = this.gameId; data['name'] = this.name; data['logo'] = this.logo; data['price'] = this.price; data['detail'] = this.detail; data['valid'] = this.valid; return data; } } class ShopUser { int? score; ShopUser({this.score}); ShopUser.fromJson(Map json) { score = json['score']; } Map toJson() { final Map data = new Map(); data['score'] = this.score; return data; } } class ScoreList { List? data; ScoreList({this.data}); ScoreList.fromJson(Map json) { if (json['data'] != null) { data = []; json['data'].forEach((v) { data!.add(new ScoreListData.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); if (this.data != null) { data['data'] = this.data!.map((v) => v.toJson()).toList(); } return data; } } class ScoreListData { int? id; int? userId; int? score; String? from; String? detail; String? createdAt; ScoreListData( {this.id, this.userId, this.score, this.from, this.detail, this.createdAt}); ScoreListData.fromJson(Map json) { id = json['id']; userId = json['user_id']; score = json['score']; from = json['from']; detail = json['detail']; createdAt = json['created_at']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['user_id'] = this.userId; data['score'] = this.score; data['from'] = this.from; data['detail'] = this.detail; data['created_at'] = this.createdAt; return data; } }