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,15 +0,0 @@
class CntInfo {
int? collect;
int? play;
int? danmaku;
int? vt;
CntInfo({this.collect, this.play, this.danmaku, this.vt});
factory CntInfo.fromJson(Map<String, dynamic> json) => CntInfo(
collect: json['collect'] as int?,
play: json['play'] as int?,
danmaku: json['danmaku'] as int?,
vt: json['vt'] as int?,
);
}

View File

@@ -1,12 +1,12 @@
import 'package:PiliPlus/models_new/sub/sub_detail/cnt_info.dart';
import 'package:PiliPlus/models_new/sub/sub_detail/upper.dart';
import 'package:PiliPlus/models/model_owner.dart';
import 'package:PiliPlus/models_new/fav/fav_detail/cnt_info.dart';
class Info {
int? id;
int? seasonType;
String? title;
String? cover;
Upper? upper;
Owner? upper;
CntInfo? cntInfo;
int? mediaCount;
String? intro;
@@ -31,7 +31,7 @@ class Info {
cover: json['cover'] as String?,
upper: json['upper'] == null
? null
: Upper.fromJson(json['upper'] as Map<String, dynamic>),
: Owner.fromJson(json['upper'] as Map<String, dynamic>),
cntInfo: json['cnt_info'] == null
? null
: CntInfo.fromJson(json['cnt_info'] as Map<String, dynamic>),

View File

@@ -1,5 +1,5 @@
import 'package:PiliPlus/models_new/sub/sub_detail/cnt_info.dart';
import 'package:PiliPlus/models_new/sub/sub_detail/upper.dart';
import 'package:PiliPlus/models/model_owner.dart';
import 'package:PiliPlus/models_new/fav/fav_detail/cnt_info.dart';
class SubDetailItemModel {
int? id;
@@ -8,7 +8,7 @@ class SubDetailItemModel {
int? duration;
int? pubtime;
String? bvid;
Upper? upper;
Owner? upper;
CntInfo? cntInfo;
int? enableVt;
String? vtDisplay;
@@ -38,7 +38,7 @@ class SubDetailItemModel {
bvid: json['bvid'] as String?,
upper: json['upper'] == null
? null
: Upper.fromJson(json['upper'] as Map<String, dynamic>),
: Owner.fromJson(json['upper'] as Map<String, dynamic>),
cntInfo: json['cnt_info'] == null
? null
: CntInfo.fromJson(json['cnt_info'] as Map<String, dynamic>),

View File

@@ -1,11 +0,0 @@
class Upper {
int? mid;
String? name;
Upper({this.mid, this.name});
factory Upper.fromJson(Map<String, dynamic> json) => Upper(
mid: json['mid'] as int?,
name: json['name'] as String?,
);
}