Files
PiliPlus/lib/models/dynamics/article_view/media.dart
dom 40fb93f036 refa: article (#757)
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-04-26 14:54:22 +08:00

48 lines
972 B
Dart

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<String, dynamic> 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<String, dynamic> toJson() => {
'score': score,
'media_id': mediaId,
'title': title,
'cover': cover,
'area': area,
'type_id': typeId,
'type_name': typeName,
'spoiler': spoiler,
'season_id': seasonId,
};
}