opt model

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-06-10 15:11:40 +08:00
parent bdf3cfc750
commit 88288f4a7a
44 changed files with 266 additions and 549 deletions

View File

@@ -1,41 +0,0 @@
class CntInfo {
int? collect;
int? play;
int? thumbUp;
int? thumbDown;
int? share;
int? reply;
int? danmaku;
int? coin;
int? vt;
int? playSwitch;
String? viewText1;
CntInfo({
this.collect,
this.play,
this.thumbUp,
this.thumbDown,
this.share,
this.reply,
this.danmaku,
this.coin,
this.vt,
this.playSwitch,
this.viewText1,
});
factory CntInfo.fromJson(Map<String, dynamic> json) => CntInfo(
collect: json['collect'] as int?,
play: json['play'] as int?,
thumbUp: json['thumb_up'] as int?,
thumbDown: json['thumb_down'] as int?,
share: json['share'] as int?,
reply: json['reply'] as int?,
danmaku: json['danmaku'] as int?,
coin: json['coin'] as int?,
vt: json['vt'] as int?,
playSwitch: json['play_switch'] as int?,
viewText1: json['view_text_1'] as String?,
);
}

View File

@@ -1,10 +1,10 @@
import 'package:PiliPlus/models/model_owner.dart';
import 'package:PiliPlus/models_new/fav/fav_detail/cnt_info.dart';
import 'package:PiliPlus/models_new/media_list/badge.dart';
import 'package:PiliPlus/models_new/media_list/cnt_info.dart';
import 'package:PiliPlus/models_new/media_list/coin.dart';
import 'package:PiliPlus/models_new/media_list/ogv_info.dart';
import 'package:PiliPlus/models_new/media_list/page.dart';
import 'package:PiliPlus/models_new/media_list/rights.dart';
import 'package:PiliPlus/models_new/media_list/upper.dart';
import 'package:PiliPlus/utils/extension.dart';
class MediaListItemModel {
@@ -26,7 +26,7 @@ class MediaListItemModel {
List<Page>? pages;
String? title;
int? type;
Upper? upper;
Owner? upper;
String? link;
String? bvid;
String? shortLink;
@@ -94,7 +94,7 @@ class MediaListItemModel {
pages = (json['pages'] as List?)?.map((e) => Page.fromJson(e)).toList();
title = json['title'] as String?;
type = json['type'] as int?;
upper = json['upper'] == null ? null : Upper.fromJson(json['upper']);
upper = json['upper'] == null ? null : Owner.fromJson(json['upper']);
link = json['link'] as String?;
bvid = json['bv_id'] as String?;
shortLink = json['short_link'] as String?;

View File

@@ -1,47 +0,0 @@
class Upper {
int? mid;
String? name;
String? face;
int? followed;
int? fans;
int? vipType;
int? vipStatue;
int? vipDueDate;
int? vipPayType;
int? officialRole;
String? officialTitle;
String? officialDesc;
String? displayName;
Upper({
this.mid,
this.name,
this.face,
this.followed,
this.fans,
this.vipType,
this.vipStatue,
this.vipDueDate,
this.vipPayType,
this.officialRole,
this.officialTitle,
this.officialDesc,
this.displayName,
});
factory Upper.fromJson(Map<String, dynamic> json) => Upper(
mid: json['mid'] as int?,
name: json['name'] as String?,
face: json['face'] as String?,
followed: json['followed'] as int?,
fans: json['fans'] as int?,
vipType: json['vip_type'] as int?,
vipStatue: json['vip_statue'] as int?,
vipDueDate: json['vip_due_date'] as int?,
vipPayType: json['vip_pay_type'] as int?,
officialRole: json['official_role'] as int?,
officialTitle: json['official_title'] as String?,
officialDesc: json['official_desc'] as String?,
displayName: json['display_name'] as String?,
);
}