mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-26 02:58:39 +00:00
28
lib/models_new/member/season_web/archive.dart
Normal file
28
lib/models_new/member/season_web/archive.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
import 'package:PiliPlus/models/model_video.dart';
|
||||
|
||||
class SeasonArchive extends BaseVideoItemModel {
|
||||
SeasonArchive.fromJson(Map<String, dynamic> json) {
|
||||
aid = json['aid'];
|
||||
bvid = json['bvid'];
|
||||
cover = json['pic'];
|
||||
title = json['title'];
|
||||
pubdate = json['pubdate'];
|
||||
duration = json['duration'];
|
||||
stat = ArchiveStat.fromJson(json['stat']);
|
||||
owner = ArchiveOwner.fromJson(json);
|
||||
}
|
||||
}
|
||||
|
||||
class ArchiveOwner extends BaseOwner {
|
||||
ArchiveOwner.fromJson(Map<String, dynamic> json) {
|
||||
mid = json['upMid'];
|
||||
name = '';
|
||||
}
|
||||
}
|
||||
|
||||
class ArchiveStat extends BaseStat {
|
||||
ArchiveStat.fromJson(Map<String, dynamic> json) {
|
||||
view = json['view'];
|
||||
danmu = json['danmaku'];
|
||||
}
|
||||
}
|
||||
18
lib/models_new/member/season_web/data.dart
Normal file
18
lib/models_new/member/season_web/data.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:PiliPlus/models_new/member/season_web/archive.dart';
|
||||
import 'package:PiliPlus/models_new/member/season_web/page.dart';
|
||||
|
||||
class SeasonWebData {
|
||||
List<SeasonArchive>? archives;
|
||||
Page? page;
|
||||
|
||||
SeasonWebData({this.archives, this.page});
|
||||
|
||||
factory SeasonWebData.fromJson(Map<String, dynamic> json) => SeasonWebData(
|
||||
archives: (json['archives'] as List<dynamic>?)
|
||||
?.map((e) => SeasonArchive.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
page: json['page'] == null
|
||||
? null
|
||||
: Page.fromJson(json['page'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
13
lib/models_new/member/season_web/page.dart
Normal file
13
lib/models_new/member/season_web/page.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Page {
|
||||
int? pageNum;
|
||||
int? pageSize;
|
||||
int? total;
|
||||
|
||||
Page({this.pageNum, this.pageSize, this.total});
|
||||
|
||||
factory Page.fromJson(Map<String, dynamic> json) => Page(
|
||||
pageNum: json['page_num'] ?? json['num'],
|
||||
pageSize: json['page_size'] ?? json['size'],
|
||||
total: json['total'] as int?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user