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

@@ -1,78 +0,0 @@
class AiConclusionModel {
AiConclusionModel({
this.code,
this.modelResult,
this.stid,
this.status,
this.likeNum,
this.dislikeNum,
});
int? code;
ModelResult? modelResult;
String? stid;
int? status;
int? likeNum;
int? dislikeNum;
AiConclusionModel.fromJson(Map<String, dynamic> json) {
code = json['code'];
modelResult = ModelResult.fromJson(json['model_result']);
stid = json['stid'];
status = json['status'];
likeNum = json['like_num'];
dislikeNum = json['dislike_num'];
}
}
class ModelResult {
ModelResult({
this.resultType,
this.summary,
this.outline,
});
int? resultType;
String? summary;
List<OutlineItem>? outline;
ModelResult.fromJson(Map<String, dynamic> json) {
resultType = json['result_type'];
summary = json['summary'];
outline = (json['outline'] as List?)
?.map<OutlineItem>((e) => OutlineItem.fromJson(e))
.toList();
}
}
class OutlineItem {
OutlineItem({
this.title,
this.partOutline,
});
String? title;
List<PartOutline>? partOutline;
OutlineItem.fromJson(Map<String, dynamic> json) {
title = json['title'];
partOutline = (json['part_outline'] as List?)
?.map<PartOutline>((e) => PartOutline.fromJson(e))
.toList();
}
}
class PartOutline {
PartOutline({
this.timestamp,
this.content,
});
int? timestamp;
String? content;
PartOutline.fromJson(Map<String, dynamic> json) {
timestamp = json['timestamp'];
content = json['content'];
}
}

View File

@@ -1,39 +0,0 @@
import 'package:PiliPlus/models/model_avatar.dart';
import 'package:PiliPlus/models/model_owner.dart';
class Author extends Owner {
int? level;
int? isSeniorMember;
Vip? vipInfo;
Pendant? pendant;
BaseOfficialVerify? official;
Author({
super.mid,
super.face,
super.name,
this.level,
this.isSeniorMember,
this.vipInfo,
this.pendant,
this.official,
});
factory Author.fromJson(Map<String, dynamic> json) => Author(
mid: json['mid'] as int?,
name: json['name'] as String?,
face: json['face'] as String?,
level: json['level'] as int?,
isSeniorMember: json['is_senior_member'] as int?,
vipInfo: json['vip_info'] == null
? null
: Vip.fromJson(json['vip_info'] as Map<String, dynamic>),
pendant: json['pendant'] == null
? null
: Pendant.fromJson(json['pendant'] as Map<String, dynamic>),
official: json['official'] == null
? null
: BaseOfficialVerify.fromJson(
json['official'] as Map<String, dynamic>),
);
}

View File

@@ -1,22 +0,0 @@
import 'package:PiliPlus/models/video/note_list/list.dart';
import 'package:PiliPlus/models/video/note_list/page.dart';
class NoteListData {
List<NoteListItemModel>? list;
Page? page;
bool? showPublicNote;
String? message;
NoteListData({this.list, this.page, this.showPublicNote, this.message});
factory NoteListData.fromJson(Map<String, dynamic> json) => NoteListData(
list: (json['list'] as List<dynamic>?)
?.map((e) => NoteListItemModel.fromJson(e as Map<String, dynamic>))
.toList(),
page: json['page'] == null
? null
: Page.fromJson(json['page'] as Map<String, dynamic>),
showPublicNote: json['show_public_note'] as bool?,
message: json['message'] as String?,
);
}

View File

@@ -1,40 +0,0 @@
import 'package:PiliPlus/models/video/note_list/author.dart';
class NoteListItemModel {
int? cvid;
String? title;
String? summary;
String? pubtime;
String? webUrl;
String? message;
Author? author;
int? likes;
bool? hasLike;
NoteListItemModel({
this.cvid,
this.title,
this.summary,
this.pubtime,
this.webUrl,
this.message,
this.author,
this.likes,
this.hasLike,
});
factory NoteListItemModel.fromJson(Map<String, dynamic> json) =>
NoteListItemModel(
cvid: json['cvid'] as int?,
title: json['title'] as String?,
summary: json['summary'] as String?,
pubtime: json['pubtime'] as String?,
webUrl: json['web_url'] as String?,
message: json['message'] as String?,
author: json['author'] == null
? null
: Author.fromJson(json['author'] as Map<String, dynamic>),
likes: json['likes'] as int?,
hasLike: json['has_like'] as bool?,
);
}

View File

@@ -1,13 +0,0 @@
class Page {
int? total;
int? size;
int? num;
Page({this.total, this.size, this.num});
factory Page.fromJson(Map<String, dynamic> json) => Page(
total: json['total'] as int?,
size: json['size'] as int?,
num: json['num'] as int?,
);
}

View File

@@ -1,17 +0,0 @@
class ReplyConfig {
ReplyConfig({
this.showtopic,
this.showUpFlag,
this.readOnly,
});
int? showtopic;
bool? showUpFlag;
bool? readOnly;
ReplyConfig.fromJson(Map<String, dynamic> json) {
showtopic = json['showtopic'];
showUpFlag = json['show_up_flag'];
readOnly = json['read_only'];
}
}

View File

@@ -1,52 +0,0 @@
class ReplyContent {
ReplyContent({
this.message,
this.atNameToMid, // @的用户的mid null
this.members, // 被@的用户List 如果有的话 []
this.emote, // 表情包 如果有的话 null
this.jumpUrl, // {}
this.pictures, // {}
this.vote,
this.richText,
this.topicsMeta,
});
String? message;
Map? atNameToMid;
List<MemberItemModel>? members;
Map? emote;
Map? jumpUrl;
List? pictures;
Map? vote;
Map? richText;
Map? topicsMeta;
ReplyContent.fromJson(Map<String, dynamic> json) {
message = json['message'];
atNameToMid = json['at_name_to_mid'];
members = (json['members'] as List?)
?.map<MemberItemModel>((e) => MemberItemModel.fromJson(e))
.toList();
emote = json['emote'];
jumpUrl = json['jump_url'];
pictures = json['pictures'];
vote = json['vote'];
richText = json['rich_text'];
topicsMeta = json['topics_meta'];
}
}
class MemberItemModel {
MemberItemModel({
required this.mid,
required this.uname,
});
late String mid;
late String uname;
MemberItemModel.fromJson(Map<String, dynamic> json) {
mid = json['mid'];
uname = json['uname'];
}
}

View File

@@ -1,77 +0,0 @@
import 'package:PiliPlus/models/video/reply/config.dart';
import 'package:PiliPlus/models/video/reply/item.dart';
import 'package:PiliPlus/models/video/reply/page.dart';
import 'package:PiliPlus/models/video/reply/upper.dart';
class ReplyData {
ReplyData({
this.page,
this.cursor,
this.config,
this.replies,
this.topReplies,
this.upper,
});
ReplyPage? page;
ReplyCursor? cursor;
ReplyConfig? config;
late List<ReplyItemModel>? replies;
late List<ReplyItemModel>? topReplies;
ReplyUpper? upper;
ReplyData.fromJson(Map<String, dynamic> json) {
page = json['page'] == null ? null : ReplyPage.fromJson(json['page']);
cursor =
json['cursor'] == null ? null : ReplyCursor.fromJson(json['cursor']);
config =
json['config'] == null ? null : ReplyConfig.fromJson(json['config']);
replies = (json['replies'] as List?)
?.map<ReplyItemModel>(
(item) => ReplyItemModel.fromJson(item, json['upper']['mid']))
.toList();
topReplies = (json['top_replies'] as List?)
?.map<ReplyItemModel>((item) => ReplyItemModel.fromJson(
item, json['upper']['mid'],
isTopStatus: true))
.toList();
upper = json['upper'] == null ? null : ReplyUpper.fromJson(json['upper']);
}
}
class ReplyReplyData {
ReplyReplyData({
this.page,
this.config,
this.replies,
this.topReplies,
this.upper,
this.root,
});
ReplyPage? page;
ReplyConfig? config;
late List<ReplyItemModel>? replies;
late List<ReplyItemModel>? topReplies;
ReplyUpper? upper;
ReplyItemModel? root;
ReplyReplyData.fromJson(Map<String, dynamic> json) {
page = json['page'] == null ? null : ReplyPage.fromJson(json['page']);
config =
json['config'] == null ? null : ReplyConfig.fromJson(json['config']);
replies = (json['replies'] as List?)
?.map<ReplyItemModel>(
(item) => ReplyItemModel.fromJson(item, json['upper']['mid']))
.toList();
topReplies = (json['top_replies'] as List?)
?.map<ReplyItemModel>((item) => ReplyItemModel.fromJson(
item, json['upper']['mid'],
isTopStatus: true))
.toList();
upper = json['upper'] == null ? null : ReplyUpper.fromJson(json['upper']);
root = json['root'] == null
? null
: ReplyItemModel.fromJson(json['root'], json['upper']?['mid']);
}
}

View File

@@ -1,298 +0,0 @@
class EmoteModelData {
Setting? setting;
List<Packages>? packages;
EmoteModelData({this.setting, this.packages});
EmoteModelData.fromJson(Map<String, dynamic> json) {
setting =
json['setting'] != null ? Setting.fromJson(json['setting']) : null;
if (json['packages'] != null) {
packages = <Packages>[];
json['packages'].forEach((v) {
packages!.add(Packages.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
if (setting != null) {
data['setting'] = setting!.toJson();
}
if (packages != null) {
data['packages'] = packages!.map((v) => v.toJson()).toList();
}
return data;
}
}
class Setting {
int? recentLimit;
int? attr;
int? focusPkgId;
String? schema;
Setting({this.recentLimit, this.attr, this.focusPkgId, this.schema});
Setting.fromJson(Map<String, dynamic> json) {
recentLimit = json['recent_limit'];
attr = json['attr'];
focusPkgId = json['focus_pkg_id'];
schema = json['schema'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['recent_limit'] = recentLimit;
data['attr'] = attr;
data['focus_pkg_id'] = focusPkgId;
data['schema'] = schema;
return data;
}
}
class Packages {
int? id;
String? text;
String? url;
int? mtime;
int? type;
int? attr;
PackagesMeta? meta;
List<Emote>? emote;
PackagesFlags? flags;
Label? label;
String? packageSubTitle;
int? refMid;
Packages(
{this.id,
this.text,
this.url,
this.mtime,
this.type,
this.attr,
this.meta,
this.emote,
this.flags,
this.label,
this.packageSubTitle,
this.refMid});
Packages.fromJson(Map<String, dynamic> json) {
id = json['id'];
text = json['text'];
url = json['url'];
mtime = json['mtime'];
type = json['type'];
attr = json['attr'];
meta = json['meta'] != null ? PackagesMeta.fromJson(json['meta']) : null;
if (json['emote'] != null) {
emote = <Emote>[];
json['emote'].forEach((v) {
emote!.add(Emote.fromJson(v));
});
}
flags =
json['flags'] != null ? PackagesFlags.fromJson(json['flags']) : null;
label = json['label'] != null ? Label.fromJson(json['label']) : null;
packageSubTitle = json['package_sub_title'];
refMid = json['ref_mid'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['text'] = text;
data['url'] = url;
data['mtime'] = mtime;
data['type'] = type;
data['attr'] = attr;
if (meta != null) {
data['meta'] = meta!.toJson();
}
if (emote != null) {
data['emote'] = emote!.map((v) => v.toJson()).toList();
}
if (flags != null) {
data['flags'] = flags!.toJson();
}
if (label != null) {
data['label'] = label!.toJson();
}
data['package_sub_title'] = packageSubTitle;
data['ref_mid'] = refMid;
return data;
}
}
class Label {
String? fontColor;
String? backgroundColor;
String? text;
Label({this.fontColor, this.backgroundColor, this.text});
Label.fromJson(Map<String, dynamic> json) {
fontColor = json['font_color'];
backgroundColor = json['background_color'];
text = json['text'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['font_color'] = fontColor;
data['background_color'] = backgroundColor;
data['text'] = text;
return data;
}
}
class PackagesMeta {
int? size;
int? itemId;
String? itemUrl;
int? assetId;
PackagesMeta({this.size, this.itemId, this.itemUrl, this.assetId});
PackagesMeta.fromJson(Map<String, dynamic> json) {
size = json['size'];
itemId = json['item_id'];
itemUrl = json['item_url'];
assetId = json['asset_id'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['size'] = size;
data['item_id'] = itemId;
data['item_url'] = itemUrl;
data['asset_id'] = assetId;
return data;
}
}
class Emote {
int? id;
int? packageId;
String? text;
String? url;
int? mtime;
int? type;
int? attr;
EmoteMeta? meta;
EmoteFlags? flags;
dynamic activity;
String? gifUrl;
Emote(
{this.id,
this.packageId,
this.text,
this.url,
this.mtime,
this.type,
this.attr,
this.meta,
this.flags,
this.activity,
this.gifUrl});
Emote.fromJson(Map<String, dynamic> json) {
id = json['id'];
packageId = json['package_id'];
text = json['text'];
url = json['url'];
mtime = json['mtime'];
type = json['type'];
attr = json['attr'];
meta = json['meta'] != null ? EmoteMeta.fromJson(json['meta']) : null;
flags = json['flags'] != null ? EmoteFlags.fromJson(json['flags']) : null;
activity = json['activity'];
gifUrl = json['gif_url'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['package_id'] = packageId;
data['text'] = text;
data['url'] = url;
data['mtime'] = mtime;
data['type'] = type;
data['attr'] = attr;
if (meta != null) {
data['meta'] = meta!.toJson();
}
if (flags != null) {
data['flags'] = flags!.toJson();
}
data['activity'] = activity;
data['gif_url'] = gifUrl;
return data;
}
}
class EmoteMeta {
int? size;
List? suggest;
String? alias;
String? gifUrl;
EmoteMeta({this.size, this.suggest, this.alias, this.gifUrl});
EmoteMeta.fromJson(Map<String, dynamic> json) {
size = json['size'];
suggest = json['suggest'];
alias = json['alias'];
gifUrl = json['gif_url'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['size'] = size;
data['suggest'] = suggest;
data['alias'] = alias;
data['gif_url'] = gifUrl;
return data;
}
}
class EmoteFlags {
bool? unlocked;
bool? recentUseForbid;
EmoteFlags({this.unlocked, this.recentUseForbid});
EmoteFlags.fromJson(Map<String, dynamic> json) {
unlocked = json['unlocked'];
recentUseForbid = json['recent_use_forbid'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['unlocked'] = unlocked;
data['recent_use_forbid'] = recentUseForbid;
return data;
}
}
class PackagesFlags {
bool? added;
bool? preview;
PackagesFlags({this.added, this.preview});
PackagesFlags.fromJson(Map<String, dynamic> json) {
added = json['added'];
preview = json['preview'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['added'] = added;
data['preview'] = preview;
return data;
}
}

View File

@@ -1,162 +0,0 @@
import 'package:PiliPlus/models/video/reply/content.dart';
import 'package:PiliPlus/models/video/reply/member.dart';
class ReplyItemModel {
ReplyItemModel({
this.rpid,
this.oid,
this.type,
this.mid,
this.root,
this.parent,
this.dialog,
this.count,
this.floor,
this.state,
this.fansgrade,
this.attr,
this.ctime,
this.rpidStr,
this.rootStr,
this.parentStr,
this.like,
this.action,
this.member,
this.content,
this.replies,
this.assist,
this.upAction,
this.invisible,
this.replyControl,
this.isUp,
this.isTop,
this.cardLabel,
this.rcount,
});
int? rpid;
int? oid;
int? type;
int? mid;
int? root;
int? parent;
int? dialog;
int? count;
int? floor;
int? state;
int? fansgrade;
int? attr;
int? ctime;
String? rpidStr;
String? rootStr;
String? parentStr;
int? like;
int? action;
ReplyMember? member;
ReplyContent? content;
List<ReplyItemModel>? replies;
int? assist;
UpAction? upAction;
bool? invisible;
ReplyControl? replyControl;
bool? isUp;
bool? isTop = false;
List? cardLabel;
dynamic rcount;
ReplyItemModel.fromJson(Map<String, dynamic> json, upperMid,
{isTopStatus = false}) {
rpid = json['rpid'];
oid = json['oid'];
type = json['type'];
mid = json['mid'];
root = json['root'];
parent = json['parent'];
dialog = json['dialog'];
count = json['count'];
floor = json['floor'];
state = json['state'];
fansgrade = json['fansgrade'];
attr = json['attr'];
ctime = json['ctime'];
rpidStr = json['rpid_str'];
rootStr = json['root_str'];
parentStr = json['parent_str'];
like = json['like'];
action = json['action'];
member =
json['member'] == null ? null : ReplyMember.fromJson(json['member']);
content =
json['content'] == null ? null : ReplyContent.fromJson(json['content']);
replies = (json['replies'] as List?)
?.map((item) => ReplyItemModel.fromJson(item, upperMid))
.toList();
assist = json['assist'];
upAction =
json['up_action'] == null ? null : UpAction.fromJson(json['up_action']);
invisible = json['invisible'];
replyControl = json['reply_control'] == null
? null
: ReplyControl.fromJson(json['reply_control']);
isUp = upperMid.toString() == json['member']['mid'];
isTop = isTopStatus;
cardLabel =
(json['card_label'] as List?)?.map((e) => e['text_content']).toList();
rcount = json['rcount'];
}
}
class UpAction {
UpAction({this.like, this.reply});
bool? like;
bool? reply;
UpAction.fromJson(Map<String, dynamic> json) {
like = json['like'];
reply = json['reply'];
}
}
class ReplyControl {
ReplyControl({
this.upReply,
this.isUpTop,
this.upLike,
this.isShow,
this.entryText,
this.titleText,
this.time,
this.location,
});
bool? upReply;
bool? isUpTop;
bool? upLike;
bool? isShow;
String? entryText;
String? titleText;
String? time;
String? location;
ReplyControl.fromJson(Map<String, dynamic> json) {
upReply = json['up_reply'] ?? false;
isUpTop = json['is_up_top'] ?? false;
upLike = json['up_like'] ?? false;
if (json['sub_reply_entry_text'] != null) {
final RegExp regex = RegExp(r"\d+");
final RegExpMatch match = regex.firstMatch(
json['sub_reply_entry_text'] == null
? ''
: json['sub_reply_entry_text']!)!;
isShow = int.parse(match.group(0)!) >= 3;
} else {
isShow = false;
}
entryText = json['sub_reply_entry_text'];
titleText = json['sub_reply_title_text'];
time = json['time_desc'];
location = json['location'] != null ? json['location'].split('')[1] : '';
}
}

View File

@@ -1,54 +0,0 @@
import 'package:PiliPlus/models/model_avatar.dart';
class ReplyMember {
ReplyMember({
this.mid,
this.uname,
this.sign,
this.avatar,
this.level,
this.pendant,
this.officialVerify,
this.vip,
this.fansDetail,
});
String? mid;
String? uname;
String? sign;
String? avatar;
int? level;
Pendant? pendant;
Map? officialVerify;
Map? vip;
Map? fansDetail;
UserSailing? userSailing;
ReplyMember.fromJson(Map<String, dynamic> json) {
mid = json['mid'];
uname = json['uname'];
sign = json['sign'];
avatar = json['avatar'];
level = json['level_info']['current_level'];
pendant =
json['pendant'] == null ? null : Pendant.fromJson(json['pendant']);
officialVerify = json['official_verify'];
vip = json['vip'];
fansDetail = json['fans_detail'];
userSailing = json['user_sailing'] != null
? UserSailing.fromJson(json['user_sailing'])
: UserSailing();
}
}
class UserSailing {
UserSailing({this.pendant, this.cardbg});
Map? pendant;
Map? cardbg;
UserSailing.fromJson(Map<String, dynamic> json) {
pendant = json['pendant'];
cardbg = json['cardbg'];
}
}

View File

@@ -1,78 +0,0 @@
class ReplyPage {
ReplyPage({
this.num,
this.size,
this.count,
this.acount,
});
int? num;
int? size;
int? count;
int? acount;
ReplyPage.fromJson(Map<String, dynamic> json) {
num = json['num'];
size = json['size'];
count = json['count'];
acount = json['acount'];
}
}
class ReplyCursor {
ReplyCursor({
this.isBegin,
this.prev,
this.next,
this.isEnd,
this.mode,
this.modeText,
this.allCount,
this.supportMode,
this.name,
this.paginationReply,
this.sessionId,
});
bool? isBegin;
int? prev;
int? next;
bool? isEnd;
int? mode;
String? modeText;
int? allCount;
List<int>? supportMode;
String? name;
PaginationReply? paginationReply;
String? sessionId;
ReplyCursor.fromJson(Map<String, dynamic> json) {
isBegin = json['is_begin'];
prev = json['prev'];
next = json['next'];
isEnd = json['is_end'];
mode = json['mode'];
modeText = json['mode_text'];
allCount = json['all_count'] ?? 0;
supportMode =
(json['support_mode'] as List?)?.map((e) => e as int).toList();
name = json['name'];
paginationReply = json['pagination_reply'] != null
? PaginationReply.fromJson(json['pagination_reply'])
: null;
sessionId = json['session_id'];
}
}
class PaginationReply {
PaginationReply({
this.nextOffset,
this.prevOffset,
});
String? nextOffset;
String? prevOffset;
PaginationReply.fromJson(Map<String, dynamic> json) {
nextOffset = json['next_offset'];
prevOffset = json['prev_offset'];
}
}

View File

@@ -1 +0,0 @@
class ReplyTop {}

View File

@@ -1,18 +0,0 @@
import 'package:PiliPlus/models/video/reply/item.dart';
class ReplyUpper {
ReplyUpper({
this.mid,
this.top,
});
int? mid;
ReplyItemModel? top;
ReplyUpper.fromJson(Map<String, dynamic> json) {
mid = json['mid'];
top = json['top'] != null
? ReplyItemModel.fromJson(json['top'], json['mid'])
: null;
}
}