opt models

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-06-04 15:20:35 +08:00
parent f50b1d2beb
commit b960359a39
858 changed files with 11000 additions and 12588 deletions

View File

@@ -0,0 +1,29 @@
class Choice {
int? id;
String? platformAction;
String? nativeAction;
String? condition;
int? cid;
String? option;
int? isDefault;
Choice({
this.id,
this.platformAction,
this.nativeAction,
this.condition,
this.cid,
this.option,
this.isDefault,
});
factory Choice.fromJson(Map<String, dynamic> json) => Choice(
id: json['id'] as int?,
platformAction: json['platform_action'] as String?,
nativeAction: json['native_action'] as String?,
condition: json['condition'] as String?,
cid: json['cid'] as int?,
option: json['option'] as String?,
isDefault: json['is_default'] as int?,
);
}

View File

@@ -0,0 +1,39 @@
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/edges.dart';
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/preload.dart';
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/story_list.dart';
class EdgeInfoData {
String? title;
int? edgeId;
List<StoryList>? storyList;
Edges? edges;
String? buvid;
Preload? preload;
int? isLeaf;
EdgeInfoData({
this.title,
this.edgeId,
this.storyList,
this.edges,
this.buvid,
this.preload,
this.isLeaf,
});
factory EdgeInfoData.fromJson(Map<String, dynamic> json) => EdgeInfoData(
title: json['title'] as String?,
edgeId: json['edge_id'] as int?,
storyList: (json['story_list'] as List<dynamic>?)
?.map((e) => StoryList.fromJson(e as Map<String, dynamic>))
.toList(),
edges: json['edges'] == null
? null
: Edges.fromJson(json['edges'] as Map<String, dynamic>),
buvid: json['buvid'] as String?,
preload: json['preload'] == null
? null
: Preload.fromJson(json['preload'] as Map<String, dynamic>),
isLeaf: json['is_leaf'] as int?,
);
}

View File

@@ -0,0 +1,15 @@
class Dimension {
int? width;
int? height;
int? rotate;
String? sar;
Dimension({this.width, this.height, this.rotate, this.sar});
factory Dimension.fromJson(Map<String, dynamic> json) => Dimension(
width: json['width'] as int?,
height: json['height'] as int?,
rotate: json['rotate'] as int?,
sar: json['sar'] as String?,
);
}

View File

@@ -0,0 +1,23 @@
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/dimension.dart';
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/question.dart';
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/skin.dart';
class Edges {
Dimension? dimension;
List<Question>? questions;
Skin? skin;
Edges({this.dimension, this.questions, this.skin});
factory Edges.fromJson(Map<String, dynamic> json) => Edges(
dimension: json['dimension'] == null
? null
: Dimension.fromJson(json['dimension'] as Map<String, dynamic>),
questions: (json['questions'] as List<dynamic>?)
?.map((e) => Question.fromJson(e as Map<String, dynamic>))
.toList(),
skin: json['skin'] == null
? null
: Skin.fromJson(json['skin'] as Map<String, dynamic>),
);
}

View File

@@ -0,0 +1,13 @@
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/video.dart';
class Preload {
List<Video>? video;
Preload({this.video});
factory Preload.fromJson(Map<String, dynamic> json) => Preload(
video: (json['video'] as List<dynamic>?)
?.map((e) => Video.fromJson(e as Map<String, dynamic>))
.toList(),
);
}

View File

@@ -0,0 +1,33 @@
import 'package:PiliPlus/models_new/video/video_stein_edgeinfo/choice.dart';
class Question {
int? id;
int? type;
int? startTimeR;
int? duration;
int? pauseVideo;
String? title;
List<Choice>? choices;
Question({
this.id,
this.type,
this.startTimeR,
this.duration,
this.pauseVideo,
this.title,
this.choices,
});
factory Question.fromJson(Map<String, dynamic> json) => Question(
id: json['id'] as int?,
type: json['type'] as int?,
startTimeR: json['start_time_r'] as int?,
duration: json['duration'] as int?,
pauseVideo: json['pause_video'] as int?,
title: json['title'] as String?,
choices: (json['choices'] as List<dynamic>?)
?.map((e) => Choice.fromJson(e as Map<String, dynamic>))
.toList(),
);
}

View File

@@ -0,0 +1,29 @@
class Skin {
String? choiceImage;
String? titleTextColor;
String? titleShadowColor;
int? titleShadowOffsetY;
int? titleShadowRadius;
String? progressbarColor;
String? progressbarShadowColor;
Skin({
this.choiceImage,
this.titleTextColor,
this.titleShadowColor,
this.titleShadowOffsetY,
this.titleShadowRadius,
this.progressbarColor,
this.progressbarShadowColor,
});
factory Skin.fromJson(Map<String, dynamic> json) => Skin(
choiceImage: json['choice_image'] as String?,
titleTextColor: json['title_text_color'] as String?,
titleShadowColor: json['title_shadow_color'] as String?,
titleShadowOffsetY: json['title_shadow_offset_y'] as int?,
titleShadowRadius: json['title_shadow_radius'] as int?,
progressbarColor: json['progressbar_color'] as String?,
progressbarShadowColor: json['progressbar_shadow_color'] as String?,
);
}

View File

@@ -0,0 +1,32 @@
class StoryList {
int? nodeId;
int? edgeId;
String? title;
int? cid;
int? startPos;
String? cover;
int? isCurrent;
int? cursor;
StoryList({
this.nodeId,
this.edgeId,
this.title,
this.cid,
this.startPos,
this.cover,
this.isCurrent,
this.cursor,
});
factory StoryList.fromJson(Map<String, dynamic> json) => StoryList(
nodeId: json['node_id'] as int?,
edgeId: json['edge_id'] as int?,
title: json['title'] as String?,
cid: json['cid'] as int?,
startPos: json['start_pos'] as int?,
cover: json['cover'] as String?,
isCurrent: json['is_current'] as int?,
cursor: json['cursor'] as int?,
);
}

View File

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