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,78 @@
import 'package:PiliPlus/models/model_avatar.dart';
class ImUserInfosData {
int? mid;
String? name;
String? sex;
String? face;
String? sign;
int? rank;
int? level;
int? silence;
Vip? vip;
Pendant? pendant;
BaseOfficialVerify? official;
int? birthday;
int? isFakeAccount;
int? isDeleted;
int? inRegAudit;
int? faceNft;
int? faceNftNew;
int? isSeniorMember;
String? digitalId;
int? digitalType;
ImUserInfosData({
this.mid,
this.name,
this.sex,
this.face,
this.sign,
this.rank,
this.level,
this.silence,
this.vip,
this.pendant,
this.official,
this.birthday,
this.isFakeAccount,
this.isDeleted,
this.inRegAudit,
this.faceNft,
this.faceNftNew,
this.isSeniorMember,
this.digitalId,
this.digitalType,
});
factory ImUserInfosData.fromJson(Map<String, dynamic> json) =>
ImUserInfosData(
mid: json['mid'] as int?,
name: json['name'] as String?,
sex: json['sex'] as String?,
face: json['face'] as String?,
sign: json['sign'] as String?,
rank: json['rank'] as int?,
level: json['level'] as int?,
silence: json['silence'] as int?,
vip: json['vip'] == null
? null
: Vip.fromJson(json['vip'] 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>),
birthday: json['birthday'] as int?,
isFakeAccount: json['is_fake_account'] as int?,
isDeleted: json['is_deleted'] as int?,
inRegAudit: json['in_reg_audit'] as int?,
faceNft: json['face_nft'] as int?,
faceNftNew: json['face_nft_new'] as int?,
isSeniorMember: json['is_senior_member'] as int?,
digitalId: json['digital_id'] as String?,
digitalType: json['digital_type'] as int?,
);
}

View File

@@ -0,0 +1,53 @@
class MsgAtContent {
String? type;
String? business;
int? businessId;
String? title;
String? image;
String? uri;
int? subjectId;
int? rootId;
int? targetId;
int? sourceId;
String? sourceContent;
String? nativeUri;
List<dynamic>? atDetails;
List<dynamic>? topicDetails;
bool? hideReplyButton;
MsgAtContent({
this.type,
this.business,
this.businessId,
this.title,
this.image,
this.uri,
this.subjectId,
this.rootId,
this.targetId,
this.sourceId,
this.sourceContent,
this.nativeUri,
this.atDetails,
this.topicDetails,
this.hideReplyButton,
});
factory MsgAtContent.fromJson(Map<String, dynamic> json) => MsgAtContent(
type: json['type'] as String?,
business: json['business'] as String?,
businessId: json['business_id'] as int?,
title: json['title'] as String?,
image: json['image'] as String?,
uri: json['uri'] as String?,
subjectId: json['subject_id'] as int?,
rootId: json['root_id'] as int?,
targetId: json['target_id'] as int?,
sourceId: json['source_id'] as int?,
sourceContent: json['source_content'] as String?,
nativeUri: json['native_uri'] as String?,
atDetails: json['at_details'] as List<dynamic>?,
topicDetails: json['topic_details'] as List<dynamic>?,
hideReplyButton: json['hide_reply_button'] as bool?,
);
}

View File

@@ -0,0 +1,13 @@
class Cursor {
bool? isEnd;
int? id;
int? time;
Cursor({this.isEnd, this.id, this.time});
factory Cursor.fromJson(Map<String, dynamic> json) => Cursor(
isEnd: json['is_end'] as bool?,
id: json['id'] as int?,
time: json['time'] as int?,
);
}

View File

@@ -0,0 +1,18 @@
import 'package:PiliPlus/models_new/msg/msg_at/cursor.dart';
import 'package:PiliPlus/models_new/msg/msg_at/item.dart';
class MsgAtData {
Cursor? cursor;
List<MsgAtItem>? items;
MsgAtData({this.cursor, this.items});
factory MsgAtData.fromJson(Map<String, dynamic> json) => MsgAtData(
cursor: json['cursor'] == null
? null
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
items: (json['items'] as List<dynamic>?)
?.map((e) => MsgAtItem.fromJson(e as Map<String, dynamic>))
.toList(),
);
}

View File

@@ -0,0 +1,22 @@
import 'package:PiliPlus/models_new/msg/msg_at/content.dart';
import 'package:PiliPlus/models_new/msg/msg_at/user.dart';
class MsgAtItem {
int? id;
User? user;
MsgAtContent? item;
int? atTime;
MsgAtItem({this.id, this.user, this.item, this.atTime});
factory MsgAtItem.fromJson(Map<String, dynamic> json) => MsgAtItem(
id: json['id'] as int?,
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
item: json['item'] == null
? null
: MsgAtContent.fromJson(json['item'] as Map<String, dynamic>),
atTime: json['at_time'] as int?,
);
}

View File

@@ -0,0 +1,26 @@
class User {
int? mid;
int? fans;
String? nickname;
String? avatar;
String? midLink;
bool? follow;
User({
this.mid,
this.fans,
this.nickname,
this.avatar,
this.midLink,
this.follow,
});
factory User.fromJson(Map<String, dynamic> json) => User(
mid: json['mid'] as int?,
fans: json['fans'] as int?,
nickname: json['nickname'] as String?,
avatar: json['avatar'] as String?,
midLink: json['mid_link'] as String?,
follow: json['follow'] as bool?,
);
}

View File

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

View File

@@ -0,0 +1,52 @@
class MsgLikeContent {
int? itemId;
int? pid;
String? type;
String? business;
int? businessId;
int? replyBusinessId;
int? likeBusinessId;
String? title;
String? desc;
String? image;
String? uri;
String? detailName;
String? nativeUri;
int? ctime;
MsgLikeContent({
this.itemId,
this.pid,
this.type,
this.business,
this.businessId,
this.replyBusinessId,
this.likeBusinessId,
this.title,
this.desc,
this.image,
this.uri,
this.detailName,
this.nativeUri,
this.ctime,
});
factory MsgLikeContent.fromJson(Map<String, dynamic> json) {
return MsgLikeContent(
itemId: json['item_id'] as int?,
pid: json['pid'] as int?,
type: json['type'] as String?,
business: json['business'] as String?,
businessId: json['business_id'] as int?,
replyBusinessId: json['reply_business_id'] as int?,
likeBusinessId: json['like_business_id'] as int?,
title: json['title'] as String?,
desc: json['desc'] as String?,
image: json['image'] as String?,
uri: json['uri'] as String?,
detailName: json['detail_name'] as String?,
nativeUri: json['native_uri'] as String?,
ctime: json['ctime'] as int?,
);
}
}

View File

@@ -0,0 +1,13 @@
class Cursor {
bool? isEnd;
int? id;
int? time;
Cursor({this.isEnd, this.id, this.time});
factory Cursor.fromJson(Map<String, dynamic> json) => Cursor(
isEnd: json['is_end'] as bool?,
id: json['id'] as int?,
time: json['time'] as int?,
);
}

View File

@@ -0,0 +1,18 @@
import 'package:PiliPlus/models_new/msg/msg_like/latest.dart';
import 'package:PiliPlus/models_new/msg/msg_like/total.dart';
class MsgLikeData {
Latest? latest;
Total? total;
MsgLikeData({this.latest, this.total});
factory MsgLikeData.fromJson(Map<String, dynamic> json) => MsgLikeData(
latest: json['latest'] == null
? null
: Latest.fromJson(json['latest'] as Map<String, dynamic>),
total: json['total'] == null
? null
: Total.fromJson(json['total'] as Map<String, dynamic>),
);
}

View File

@@ -0,0 +1,34 @@
import 'package:PiliPlus/models_new/msg/msg_like/content.dart';
import 'package:PiliPlus/models_new/msg/msg_like/user.dart';
class MsgLikeItem {
int? id;
List<User>? users;
MsgLikeContent? item;
int? counts;
int? likeTime;
int? noticeState;
MsgLikeItem({
this.id,
this.users,
this.item,
this.counts,
this.likeTime,
this.noticeState,
});
factory MsgLikeItem.fromJson(Map<String, dynamic> json) => MsgLikeItem(
id: json['id'] as int?,
users: (json['users'] as List<dynamic>?)
?.map((e) => User.fromJson(e as Map<String, dynamic>))
.toList(),
item: json['item'] == null
? null
: MsgLikeContent.fromJson(json['item'] as Map<String, dynamic>),
counts: json['counts'] as int?,
likeTime: json['like_time'] as int?,
noticeState: json['notice_state'] as int?,
);
}

View File

@@ -0,0 +1,15 @@
import 'package:PiliPlus/models_new/msg/msg_like/item.dart';
class Latest {
List<MsgLikeItem>? items;
int? lastViewAt;
Latest({this.items, this.lastViewAt});
factory Latest.fromJson(Map<String, dynamic> json) => Latest(
items: (json['items'] as List<dynamic>?)
?.map((e) => MsgLikeItem.fromJson(e))
.toList(),
lastViewAt: json['last_view_at'] as int?,
);
}

View File

@@ -0,0 +1,18 @@
import 'package:PiliPlus/models_new/msg/msg_like/cursor.dart';
import 'package:PiliPlus/models_new/msg/msg_like/item.dart';
class Total {
Cursor? cursor;
List<MsgLikeItem>? items;
Total({this.cursor, this.items});
factory Total.fromJson(Map<String, dynamic> json) => Total(
cursor: json['cursor'] == null
? null
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
items: (json['items'] as List<dynamic>?)
?.map((e) => MsgLikeItem.fromJson(e as Map<String, dynamic>))
.toList(),
);
}

View File

@@ -0,0 +1,26 @@
class User {
int? mid;
int? fans;
String? nickname;
String? avatar;
String? midLink;
bool? follow;
User({
this.mid,
this.fans,
this.nickname,
this.avatar,
this.midLink,
this.follow,
});
factory User.fromJson(Map<String, dynamic> json) => User(
mid: json['mid'] as int?,
fans: json['fans'] as int?,
nickname: json['nickname'] as String?,
avatar: json['avatar'] as String?,
midLink: json['mid_link'] as String?,
follow: json['follow'] as bool?,
);
}

View File

@@ -0,0 +1,79 @@
class MsgReplyContent {
int? subjectId;
int? rootId;
int? sourceId;
int? targetId;
String? type;
int? businessId;
String? business;
String? title;
String? desc;
String? image;
String? uri;
String? nativeUri;
String? detailTitle;
String? rootReplyContent;
String? sourceContent;
String? targetReplyContent;
List<dynamic>? atDetails;
List<dynamic>? topicDetails;
bool? hideReplyButton;
bool? hideLikeButton;
int? likeState;
dynamic danmu;
String? message;
MsgReplyContent({
this.subjectId,
this.rootId,
this.sourceId,
this.targetId,
this.type,
this.businessId,
this.business,
this.title,
this.desc,
this.image,
this.uri,
this.nativeUri,
this.detailTitle,
this.rootReplyContent,
this.sourceContent,
this.targetReplyContent,
this.atDetails,
this.topicDetails,
this.hideReplyButton,
this.hideLikeButton,
this.likeState,
this.danmu,
this.message,
});
factory MsgReplyContent.fromJson(Map<String, dynamic> json) {
return MsgReplyContent(
subjectId: json['subject_id'] as int?,
rootId: json['root_id'] as int?,
sourceId: json['source_id'] as int?,
targetId: json['target_id'] as int?,
type: json['type'] as String?,
businessId: json['business_id'] as int?,
business: json['business'] as String?,
title: json['title'] as String?,
desc: json['desc'] as String?,
image: json['image'] as String?,
uri: json['uri'] as String?,
nativeUri: json['native_uri'] as String?,
detailTitle: json['detail_title'] as String?,
rootReplyContent: json['root_reply_content'] as String?,
sourceContent: json['source_content'] as String?,
targetReplyContent: json['target_reply_content'] as String?,
atDetails: json['at_details'] as List<dynamic>?,
topicDetails: json['topic_details'] as List<dynamic>?,
hideReplyButton: json['hide_reply_button'] as bool?,
hideLikeButton: json['hide_like_button'] as bool?,
likeState: json['like_state'] as int?,
danmu: json['danmu'] as dynamic,
message: json['message'] as String?,
);
}
}

View File

@@ -0,0 +1,13 @@
class Cursor {
bool? isEnd;
int? id;
int? time;
Cursor({this.isEnd, this.id, this.time});
factory Cursor.fromJson(Map<String, dynamic> json) => Cursor(
isEnd: json['is_end'] as bool?,
id: json['id'] as int?,
time: json['time'] as int?,
);
}

View File

@@ -0,0 +1,20 @@
import 'package:PiliPlus/models_new/msg/msg_reply/cursor.dart';
import 'package:PiliPlus/models_new/msg/msg_reply/item.dart';
class MsgReplyData {
Cursor? cursor;
List<MsgReplyItem>? items;
int? lastViewAt;
MsgReplyData({this.cursor, this.items, this.lastViewAt});
factory MsgReplyData.fromJson(Map<String, dynamic> json) => MsgReplyData(
cursor: json['cursor'] == null
? null
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
items: (json['items'] as List<dynamic>?)
?.map((e) => MsgReplyItem.fromJson(e as Map<String, dynamic>))
.toList(),
lastViewAt: json['last_view_at'] as int?,
);
}

View File

@@ -0,0 +1,34 @@
import 'package:PiliPlus/models_new/msg/msg_reply/content.dart';
import 'package:PiliPlus/models_new/msg/msg_reply/user.dart';
class MsgReplyItem {
int? id;
User? user;
MsgReplyContent? item;
int? counts;
int? isMulti;
int? replyTime;
MsgReplyItem({
this.id,
this.user,
this.item,
this.counts,
this.isMulti,
this.replyTime,
});
factory MsgReplyItem.fromJson(Map<String, dynamic> json) => MsgReplyItem(
id: json['id'] as int?,
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
item: json['item'] == null
? null
: MsgReplyContent.fromJson(json['item'] as Map<String, dynamic>),
counts: json['counts'] as int?,
isMulti: json['is_multi'] as int?,
replyTime: json['reply_time'] as int?,
);
}

View File

@@ -0,0 +1,26 @@
class User {
int? mid;
int? fans;
String? nickname;
String? avatar;
String? midLink;
bool? follow;
User({
this.mid,
this.fans,
this.nickname,
this.avatar,
this.midLink,
this.follow,
});
factory User.fromJson(Map<String, dynamic> json) => User(
mid: json['mid'] as int?,
fans: json['fans'] as int?,
nickname: json['nickname'] as String?,
avatar: json['avatar'] as String?,
midLink: json['mid_link'] as String?,
follow: json['follow'] as bool?,
);
}

View File

@@ -0,0 +1,79 @@
import 'dart:convert';
import 'package:PiliPlus/models_new/msg/msg_sys/publisher.dart';
import 'package:PiliPlus/models_new/msg/msg_sys/source.dart';
class MsgSysItem {
int? id;
int? cursor;
Publisher? publisher;
int? type;
String? title;
String? content;
Source? source;
String? timeAt;
int? cardType;
String? cardBrief;
String? cardMsgBrief;
String? cardCover;
String? cardStoryTitle;
String? cardLink;
String? mc;
int? isStation;
int? isSend;
int? notifyCursor;
MsgSysItem({
this.id,
this.cursor,
this.publisher,
this.type,
this.title,
this.content,
this.source,
this.timeAt,
this.cardType,
this.cardBrief,
this.cardMsgBrief,
this.cardCover,
this.cardStoryTitle,
this.cardLink,
this.mc,
this.isStation,
this.isSend,
this.notifyCursor,
});
MsgSysItem.fromJson(Map<String, dynamic> json) {
id = json['id'] as int?;
cursor = json['cursor'] as int?;
publisher = json['publisher'] == null
? null
: Publisher.fromJson(json['publisher'] as Map<String, dynamic>);
type = json['type'] as int?;
title = json['title'] as String?;
content = json['content'] as String?;
if (content != null) {
try {
dynamic json = jsonDecode(content!);
if (json?['web'] != null) {
content = json['web'];
}
} catch (_) {}
}
source = json['source'] == null
? null
: Source.fromJson(json['source'] as Map<String, dynamic>);
timeAt = json['time_at'] as String?;
cardType = json['card_type'] as int?;
cardBrief = json['card_brief'] as String?;
cardMsgBrief = json['card_msg_brief'] as String?;
cardCover = json['card_cover'] as String?;
cardStoryTitle = json['card_story_title'] as String?;
cardLink = json['card_link'] as String?;
mc = json['mc'] as String?;
isStation = json['is_station'] as int?;
isSend = json['is_send'] as int?;
notifyCursor = json['notify_cursor'] as int?;
}
}

View File

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

View File

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

View File

@@ -0,0 +1,15 @@
import 'package:fixnum/fixnum.dart';
class MsgFeedUnread {
int at = 0;
int like = 0;
int reply = 0;
int sysMsg = 0;
MsgFeedUnread.fromJson(Map<String, Int64> json) {
at = json['at']?.toInt() ?? 0;
like = json['like']?.toInt() ?? 0;
reply = json['reply']?.toInt() ?? 0;
sysMsg = json['sys_msg']?.toInt() ?? 0;
}
}

View File

@@ -0,0 +1,20 @@
class SessionSsData {
int? followStatus;
int? special;
int? pushSetting;
int? showPushSetting;
SessionSsData({
this.followStatus,
this.special,
this.pushSetting,
this.showPushSetting,
});
factory SessionSsData.fromJson(Map<String, dynamic> json) => SessionSsData(
followStatus: json['follow_status'] as int?,
special: json['special'] as int?,
pushSetting: json['push_setting'] as int?,
showPushSetting: json['show_push_setting'] as int?,
);
}