mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 08:38:18 +08:00
@@ -1,55 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/space/space_season_series/stat.dart';
|
||||
|
||||
class SpaceSsArchive {
|
||||
int? aid;
|
||||
String? bvid;
|
||||
int? ctime;
|
||||
int? duration;
|
||||
bool? enableVt;
|
||||
bool? interactiveVideo;
|
||||
String? pic;
|
||||
int? playbackPosition;
|
||||
int? pubdate;
|
||||
SpaceSsStat? stat;
|
||||
int? state;
|
||||
String? title;
|
||||
int? ugcPay;
|
||||
String? vtDisplay;
|
||||
int? isLessonVideo;
|
||||
|
||||
SpaceSsArchive({
|
||||
this.aid,
|
||||
this.bvid,
|
||||
this.ctime,
|
||||
this.duration,
|
||||
this.enableVt,
|
||||
this.interactiveVideo,
|
||||
this.pic,
|
||||
this.playbackPosition,
|
||||
this.pubdate,
|
||||
this.stat,
|
||||
this.state,
|
||||
this.title,
|
||||
this.ugcPay,
|
||||
this.vtDisplay,
|
||||
this.isLessonVideo,
|
||||
});
|
||||
|
||||
factory SpaceSsArchive.fromJson(Map<String, dynamic> json) => SpaceSsArchive(
|
||||
aid: json["aid"],
|
||||
bvid: json["bvid"],
|
||||
ctime: json["ctime"],
|
||||
duration: json["duration"],
|
||||
enableVt: json["enable_vt"],
|
||||
interactiveVideo: json["interactive_video"],
|
||||
pic: json["pic"],
|
||||
playbackPosition: json["playback_position"],
|
||||
pubdate: json["pubdate"],
|
||||
stat: json["stat"] == null ? null : SpaceSsStat.fromJson(json["stat"]),
|
||||
state: json["state"],
|
||||
title: json["title"],
|
||||
ugcPay: json["ugc_pay"],
|
||||
vtDisplay: json["vt_display"],
|
||||
isLessonVideo: json["is_lesson_video"],
|
||||
);
|
||||
}
|
||||
@@ -1,23 +1,5 @@
|
||||
class SpaceSsStat {
|
||||
int? view;
|
||||
int? vt;
|
||||
|
||||
SpaceSsStat({
|
||||
this.view,
|
||||
this.vt,
|
||||
});
|
||||
|
||||
factory SpaceSsStat.fromJson(Map<String, dynamic> json) => SpaceSsStat(
|
||||
view: json["view"],
|
||||
vt: json["vt"],
|
||||
);
|
||||
}
|
||||
|
||||
class SpaceSsMeta {
|
||||
int? category;
|
||||
String? cover;
|
||||
String? description;
|
||||
int? mid;
|
||||
String? name;
|
||||
int? ptime;
|
||||
int? total;
|
||||
@@ -25,10 +7,7 @@ class SpaceSsMeta {
|
||||
dynamic seriesId;
|
||||
|
||||
SpaceSsMeta({
|
||||
this.category,
|
||||
this.cover,
|
||||
this.description,
|
||||
this.mid,
|
||||
this.name,
|
||||
this.ptime,
|
||||
this.total,
|
||||
@@ -37,10 +16,7 @@ class SpaceSsMeta {
|
||||
});
|
||||
|
||||
factory SpaceSsMeta.fromJson(Map<String, dynamic> json) => SpaceSsMeta(
|
||||
category: json["category"],
|
||||
cover: json["cover"],
|
||||
description: json["description"],
|
||||
mid: json["mid"],
|
||||
name: json["name"],
|
||||
ptime: json["ptime"],
|
||||
total: json["total"],
|
||||
@@ -1,17 +1,11 @@
|
||||
class SpaceSsPage {
|
||||
int? pageNum;
|
||||
int? pageSize;
|
||||
int? total;
|
||||
|
||||
SpaceSsPage({
|
||||
this.pageNum,
|
||||
this.pageSize,
|
||||
this.total,
|
||||
});
|
||||
|
||||
factory SpaceSsPage.fromJson(Map<String, dynamic> json) => SpaceSsPage(
|
||||
pageNum: json["page_num"],
|
||||
pageSize: json["page_size"],
|
||||
total: json["total"],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,23 +1,11 @@
|
||||
import 'package:PiliPlus/models_new/space/space_season_series/archive.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_season_series/stat.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_season_series/meta.dart';
|
||||
|
||||
class SpaceSsModel {
|
||||
List<SpaceSsArchive>? archives;
|
||||
SpaceSsMeta? meta;
|
||||
List<int>? recentAids;
|
||||
|
||||
SpaceSsModel({
|
||||
this.archives,
|
||||
this.meta,
|
||||
this.recentAids,
|
||||
});
|
||||
SpaceSsModel({this.meta});
|
||||
|
||||
factory SpaceSsModel.fromJson(Map<String, dynamic> json) => SpaceSsModel(
|
||||
archives: (json["archives"] as List?)
|
||||
?.map((e) => SpaceSsArchive.fromJson(e))
|
||||
.toList(),
|
||||
meta: json["meta"] == null ? null : SpaceSsMeta.fromJson(json["meta"]),
|
||||
recentAids: (json["recent_aids"] as List?)?.fromCast(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user