mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-15 22:00:12 +08:00
@@ -1,14 +1,12 @@
|
||||
import 'package:PiliPlus/models_new/sub/sub/list.dart';
|
||||
|
||||
class SubData {
|
||||
int? count;
|
||||
List<SubItemModel>? list;
|
||||
bool? hasMore;
|
||||
|
||||
SubData({this.count, this.list, this.hasMore});
|
||||
SubData({this.list, this.hasMore});
|
||||
|
||||
factory SubData.fromJson(Map<String, dynamic> json) => SubData(
|
||||
count: json['count'] as int?,
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => SubItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
|
||||
@@ -6,7 +6,6 @@ class SubItemModel {
|
||||
int? fid;
|
||||
int? mid;
|
||||
int? attr;
|
||||
String? attrDesc;
|
||||
String? title;
|
||||
String? cover;
|
||||
Owner? upper;
|
||||
@@ -18,13 +17,7 @@ class SubItemModel {
|
||||
int? favState;
|
||||
int? mediaCount;
|
||||
int? viewCount;
|
||||
int? vt;
|
||||
bool? isTop;
|
||||
dynamic recentFav;
|
||||
int? playSwitch;
|
||||
int? type;
|
||||
String? link;
|
||||
String? bvid;
|
||||
CntInfo? cntInfo;
|
||||
|
||||
SubItemModel({
|
||||
@@ -32,7 +25,6 @@ class SubItemModel {
|
||||
this.fid,
|
||||
this.mid,
|
||||
this.attr,
|
||||
this.attrDesc,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.upper,
|
||||
@@ -44,13 +36,7 @@ class SubItemModel {
|
||||
this.favState,
|
||||
this.mediaCount,
|
||||
this.viewCount,
|
||||
this.vt,
|
||||
this.isTop,
|
||||
this.recentFav,
|
||||
this.playSwitch,
|
||||
this.type,
|
||||
this.link,
|
||||
this.bvid,
|
||||
this.cntInfo,
|
||||
});
|
||||
|
||||
@@ -59,7 +45,6 @@ class SubItemModel {
|
||||
fid: json['fid'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
attr: json['attr'] as int?,
|
||||
attrDesc: json['attr_desc'] as String?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
upper: json['upper'] == null
|
||||
@@ -73,13 +58,7 @@ class SubItemModel {
|
||||
favState: json['fav_state'] as int?,
|
||||
mediaCount: json['media_count'] as int?,
|
||||
viewCount: json['view_count'] as int?,
|
||||
vt: json['vt'] as int?,
|
||||
isTop: json['is_top'] as bool?,
|
||||
recentFav: json['recent_fav'] as dynamic,
|
||||
playSwitch: json['play_switch'] as int?,
|
||||
type: json['type'] as int?,
|
||||
link: json['link'] as String?,
|
||||
bvid: json['bvid'] as String?,
|
||||
cntInfo: json['cnt_info'] == null
|
||||
? null
|
||||
: CntInfo.fromJson(json['cnt_info']),
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/cnt_info.dart';
|
||||
|
||||
class SubDetailItemModel {
|
||||
@@ -8,11 +7,7 @@ class SubDetailItemModel {
|
||||
int? duration;
|
||||
int? pubtime;
|
||||
String? bvid;
|
||||
Owner? upper;
|
||||
CntInfo? cntInfo;
|
||||
int? enableVt;
|
||||
String? vtDisplay;
|
||||
bool? isSelfView;
|
||||
|
||||
SubDetailItemModel({
|
||||
this.id,
|
||||
@@ -21,11 +16,7 @@ class SubDetailItemModel {
|
||||
this.duration,
|
||||
this.pubtime,
|
||||
this.bvid,
|
||||
this.upper,
|
||||
this.cntInfo,
|
||||
this.enableVt,
|
||||
this.vtDisplay,
|
||||
this.isSelfView,
|
||||
});
|
||||
|
||||
factory SubDetailItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -36,14 +27,8 @@ class SubDetailItemModel {
|
||||
duration: json['duration'] as int?,
|
||||
pubtime: json['pubtime'] as int?,
|
||||
bvid: json['bvid'] as String?,
|
||||
upper: json['upper'] == null
|
||||
? null
|
||||
: Owner.fromJson(json['upper'] as Map<String, dynamic>),
|
||||
cntInfo: json['cnt_info'] == null
|
||||
? null
|
||||
: CntInfo.fromJson(json['cnt_info'] as Map<String, dynamic>),
|
||||
enableVt: json['enable_vt'] as int?,
|
||||
vtDisplay: json['vt_display'] as String?,
|
||||
isSelfView: json['is_self_view'] as bool?,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user