1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
| class GqlIndexResponseEntity { GqlIndexResponseEntity({ this.dictCategories, this.dictChannels, this.busNews, });
List<DictCategoryEntity> dictCategories; List<DictChannelEntity> dictChannels; List<GqlNewsResponseEntity> busNews;
factory GqlIndexResponseEntity.fromJson(Map<String, dynamic> json) => GqlIndexResponseEntity( dictCategories: List<DictCategoryEntity>.from( json["dictCategories"].map((x) => DictCategoryEntity.fromJson(x))), dictChannels: List<DictChannelEntity>.from( json["dictChannels"].map((x) => DictChannelEntity.fromJson(x))), busNews: List<GqlNewsResponseEntity>.from( json["busNews"].map((x) => GqlNewsResponseEntity.fromJson(x))), );
Map<String, dynamic> toJson() => { "dictCategories": List<dynamic>.from(dictCategories.map((x) => x.toJson())), "dictChannels": List<dynamic>.from(dictChannels.map((x) => x.toJson())), "busNews": List<dynamic>.from(busNews.map((x) => x.toJson())), }; }
class GqlNewsResponseEntity { GqlNewsResponseEntity({ this.title, this.dictChannel, this.dictCategories, this.author, this.url, this.addtime, this.thumbnail, });
String title; DictChannelEntity dictChannel; List<DictCategoryEntity> dictCategories; String author; String url; DateTime addtime; ThumbnailEntity thumbnail;
factory GqlNewsResponseEntity.fromJson(Map<String, dynamic> json) => GqlNewsResponseEntity( title: json["title"], dictChannel: DictChannelEntity.fromJson(json["dict_channel"]), dictCategories: List<DictCategoryEntity>.from( json["dict_categories"].map((x) => DictCategoryEntity.fromJson(x))), author: json["author"], url: json["url"], addtime: DateTime.parse(json["addtime"]), thumbnail: ThumbnailEntity.fromJson(json["thumbnail"]), );
Map<String, dynamic> toJson() => { "title": title, "dict_channel": dictChannel.toJson(), "dict_categories": List<dynamic>.from(dictCategories.map((x) => x.toJson())), "author": author, "url": url, "addtime": "${addtime.year.toString().padLeft(4, '0')}-${addtime.month.toString().padLeft(2, '0')}-${addtime.day.toString().padLeft(2, '0')}", "ThumbnailEntity": thumbnail.toJson(), }; }
class DictCategoryEntity { DictCategoryEntity({ this.code, this.title, });
String code; String title;
factory DictCategoryEntity.fromJson(Map<String, dynamic> json) => DictCategoryEntity( code: json["code"], title: json["title"], );
Map<String, dynamic> toJson() => { "code": code, "title": title, }; }
class DictChannelEntity { DictChannelEntity({ this.code, this.title, this.icon, });
String code; String title; ThumbnailEntity icon;
factory DictChannelEntity.fromJson(Map<String, dynamic> json) => DictChannelEntity( code: json["code"], title: json["title"], icon: ThumbnailEntity.fromJson(json["icon"]), );
Map<String, dynamic> toJson() => { "code": code, "title": title, "icon": icon.toJson(), }; }
class ThumbnailEntity { ThumbnailEntity({ this.url, });
String url;
factory ThumbnailEntity.fromJson(Map<String, dynamic> json) => ThumbnailEntity( url: json["url"], );
Map<String, dynamic> toJson() => { "url": url, }; }
|