class Media { int? score; int? mediaId; String? title; String? cover; String? area; int? typeId; String? typeName; int? spoiler; int? seasonId; Media({ this.score, this.mediaId, this.title, this.cover, this.area, this.typeId, this.typeName, this.spoiler, this.seasonId, }); factory Media.fromJson(Map json) => Media( score: json['score'] as int?, mediaId: json['media_id'] as int?, title: json['title'] as String?, cover: json['cover'] as String?, area: json['area'] as String?, typeId: json['type_id'] as int?, typeName: json['type_name'] as String?, spoiler: json['spoiler'] as int?, seasonId: json['season_id'] as int?, ); Map toJson() => { 'score': score, 'media_id': mediaId, 'title': title, 'cover': cover, 'area': area, 'type_id': typeId, 'type_name': typeName, 'spoiler': spoiler, 'season_id': seasonId, }; }