mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-24 20:35:50 +08:00
38
lib/models_new/member/search_archive/data.dart
Normal file
38
lib/models_new/member/search_archive/data.dart
Normal file
@@ -0,0 +1,38 @@
|
||||
import 'package:PiliPlus/models_new/member/search_archive/episodic_button.dart';
|
||||
import 'package:PiliPlus/models_new/member/search_archive/list.dart';
|
||||
import 'package:PiliPlus/models_new/member/search_archive/page.dart';
|
||||
|
||||
class SearchArchiveData {
|
||||
SearchArchiveList? list;
|
||||
Page? page;
|
||||
EpisodicButton? episodicButton;
|
||||
bool? isRisk;
|
||||
int? gaiaResType;
|
||||
dynamic gaiaData;
|
||||
|
||||
SearchArchiveData({
|
||||
this.list,
|
||||
this.page,
|
||||
this.episodicButton,
|
||||
this.isRisk,
|
||||
this.gaiaResType,
|
||||
this.gaiaData,
|
||||
});
|
||||
|
||||
factory SearchArchiveData.fromJson(Map<String, dynamic> json) =>
|
||||
SearchArchiveData(
|
||||
list: json['list'] == null
|
||||
? null
|
||||
: SearchArchiveList.fromJson(json['list'] as Map<String, dynamic>),
|
||||
page: json['page'] == null
|
||||
? null
|
||||
: Page.fromJson(json['page'] as Map<String, dynamic>),
|
||||
episodicButton: json['episodic_button'] == null
|
||||
? null
|
||||
: EpisodicButton.fromJson(
|
||||
json['episodic_button'] as Map<String, dynamic>),
|
||||
isRisk: json['is_risk'] as bool?,
|
||||
gaiaResType: json['gaia_res_type'] as int?,
|
||||
gaiaData: json['gaia_data'] as dynamic,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/member/search_archive/episodic_button.dart
Normal file
13
lib/models_new/member/search_archive/episodic_button.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class EpisodicButton {
|
||||
String? text;
|
||||
String? uri;
|
||||
|
||||
EpisodicButton({this.text, this.uri});
|
||||
|
||||
factory EpisodicButton.fromJson(Map<String, dynamic> json) {
|
||||
return EpisodicButton(
|
||||
text: json['text'] as String?,
|
||||
uri: json['uri'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
14
lib/models_new/member/search_archive/list.dart
Normal file
14
lib/models_new/member/search_archive/list.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
import 'package:PiliPlus/models_new/member/search_archive/vlist.dart';
|
||||
|
||||
class SearchArchiveList {
|
||||
List<VListItemModel>? vlist;
|
||||
|
||||
SearchArchiveList({this.vlist});
|
||||
|
||||
factory SearchArchiveList.fromJson(Map<String, dynamic> json) =>
|
||||
SearchArchiveList(
|
||||
vlist: (json['vlist'] as List<dynamic>?)
|
||||
?.map((e) => VListItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
13
lib/models_new/member/search_archive/page.dart
Normal file
13
lib/models_new/member/search_archive/page.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Page {
|
||||
int? pn;
|
||||
int? ps;
|
||||
int? count;
|
||||
|
||||
Page({this.pn, this.ps, this.count});
|
||||
|
||||
factory Page.fromJson(Map<String, dynamic> json) => Page(
|
||||
pn: json['pn'] as int?,
|
||||
ps: json['ps'] as int?,
|
||||
count: json['count'] as int?,
|
||||
);
|
||||
}
|
||||
45
lib/models_new/member/search_archive/vlist.dart
Normal file
45
lib/models_new/member/search_archive/vlist.dart
Normal file
@@ -0,0 +1,45 @@
|
||||
import 'package:PiliPlus/models/model_video.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
|
||||
class VListItemModel extends BaseVideoItemModel {
|
||||
int? comment;
|
||||
int? typeid;
|
||||
String? subtitle;
|
||||
String? copyright;
|
||||
int? review;
|
||||
bool? hideClick;
|
||||
bool? isChargingSrc;
|
||||
|
||||
VListItemModel.fromJson(Map<String, dynamic> json) {
|
||||
comment = json['comment'];
|
||||
typeid = json['typeid'];
|
||||
cover = json['pic'];
|
||||
subtitle = json['subtitle'];
|
||||
desc = json['description'];
|
||||
copyright = json['copyright'];
|
||||
title = json['title'];
|
||||
review = json['review'];
|
||||
pubdate = json['created'];
|
||||
if (json['length'] != null) duration = Utils.duration(json['length']);
|
||||
aid = json['aid'];
|
||||
bvid = json['bvid'];
|
||||
hideClick = json['hide_click'];
|
||||
isChargingSrc = json['is_charging_arc'];
|
||||
stat = VListStat.fromJson(json);
|
||||
owner = VListOwner.fromJson(json);
|
||||
}
|
||||
}
|
||||
|
||||
class VListOwner extends BaseOwner {
|
||||
VListOwner.fromJson(Map<String, dynamic> json) {
|
||||
mid = json["mid"];
|
||||
name = json["author"];
|
||||
}
|
||||
}
|
||||
|
||||
class VListStat extends BaseStat {
|
||||
VListStat.fromJson(Map<String, dynamic> json) {
|
||||
view = json["play"];
|
||||
danmu = json['video_review'];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user