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,19 @@
import 'package:PiliPlus/models_new/live/live_room_info_h5/base_info.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/relation_info.dart';
class AnchorInfo {
BaseInfo? baseInfo;
RelationInfo? relationInfo;
AnchorInfo({this.baseInfo, this.relationInfo});
factory AnchorInfo.fromJson(Map<String, dynamic> json) => AnchorInfo(
baseInfo: json['base_info'] == null
? null
: BaseInfo.fromJson(json['base_info'] as Map<String, dynamic>),
relationInfo: json['relation_info'] == null
? null
: RelationInfo.fromJson(
json['relation_info'] as Map<String, dynamic>),
);
}

View File

@@ -0,0 +1,13 @@
import 'package:PiliPlus/models_new/live/live_room_info_h5/area_masks.dart';
class AreaMaskInfo {
AreaMasks? areaMasks;
AreaMaskInfo({this.areaMasks});
factory AreaMaskInfo.fromJson(Map<String, dynamic> json) => AreaMaskInfo(
areaMasks: json['area_masks'] == null
? null
: AreaMasks.fromJson(json['area_masks'] as Map<String, dynamic>),
);
}

View File

@@ -0,0 +1,13 @@
class AreaMasks {
dynamic horizontalMasks;
dynamic verticalMasks;
dynamic fullMask;
AreaMasks({this.horizontalMasks, this.verticalMasks, this.fullMask});
factory AreaMasks.fromJson(Map<String, dynamic> json) => AreaMasks(
horizontalMasks: json['horizontal_masks'] as dynamic,
verticalMasks: json['vertical_masks'] as dynamic,
fullMask: json['full_mask'] as dynamic,
);
}

View File

@@ -0,0 +1,18 @@
import 'package:PiliPlus/models_new/live/live_room_info_h5/official_info.dart';
class BaseInfo {
String? uname;
String? face;
OfficialInfo? officialInfo;
BaseInfo({this.uname, this.face, this.officialInfo});
factory BaseInfo.fromJson(Map<String, dynamic> json) => BaseInfo(
uname: json['uname'] as String?,
face: json['face'] as String?,
officialInfo: json['official_info'] == null
? null
: OfficialInfo.fromJson(
json['official_info'] as Map<String, dynamic>),
);
}

View File

@@ -0,0 +1,13 @@
class BlockInfo {
bool? block;
String? desc;
int? business;
BlockInfo({this.block, this.desc, this.business});
factory BlockInfo.fromJson(Map<String, dynamic> json) => BlockInfo(
block: json['block'] as bool?,
desc: json['desc'] as String?,
business: json['business'] as int?,
);
}

View File

@@ -0,0 +1,70 @@
import 'package:PiliPlus/models_new/live/live_feed_index/watched_show.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/anchor_info.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/area_mask_info.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/block_info.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/like_info_v3.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/new_switch_info.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/news_info.dart';
import 'package:PiliPlus/models_new/live/live_room_info_h5/room_info.dart';
class RoomInfoH5Data {
RoomInfo? roomInfo;
AnchorInfo? anchorInfo;
NewSwitchInfo? newSwitchInfo;
List<dynamic>? bannerInfo;
int? isRoomFeed;
List<dynamic>? tabInfo;
NewsInfo? newsInfo;
WatchedShow? watchedShow;
LikeInfoV3? likeInfoV3;
BlockInfo? blockInfo;
AreaMaskInfo? areaMaskInfo;
RoomInfoH5Data({
this.roomInfo,
this.anchorInfo,
this.newSwitchInfo,
this.bannerInfo,
this.isRoomFeed,
this.tabInfo,
this.newsInfo,
this.watchedShow,
this.likeInfoV3,
this.blockInfo,
this.areaMaskInfo,
});
factory RoomInfoH5Data.fromJson(Map<String, dynamic> json) => RoomInfoH5Data(
roomInfo: json['room_info'] == null
? null
: RoomInfo.fromJson(json['room_info'] as Map<String, dynamic>),
anchorInfo: json['anchor_info'] == null
? null
: AnchorInfo.fromJson(json['anchor_info'] as Map<String, dynamic>),
newSwitchInfo: json['new_switch_info'] == null
? null
: NewSwitchInfo.fromJson(
json['new_switch_info'] as Map<String, dynamic>),
bannerInfo: json['banner_info'] as List<dynamic>?,
isRoomFeed: json['is_room_feed'] as int?,
tabInfo: json['tab_info'] as List<dynamic>?,
newsInfo: json['news_info'] == null
? null
: NewsInfo.fromJson(json['news_info'] as Map<String, dynamic>),
watchedShow: json['watched_show'] == null
? null
: WatchedShow.fromJson(
json['watched_show'] as Map<String, dynamic>),
likeInfoV3: json['like_info_v3'] == null
? null
: LikeInfoV3.fromJson(json['like_info_v3'] as Map<String, dynamic>),
blockInfo: json['block_info'] == null
? null
: BlockInfo.fromJson(json['block_info'] as Map<String, dynamic>),
areaMaskInfo: json['area_mask_info'] == null
? null
: AreaMaskInfo.fromJson(
json['area_mask_info'] as Map<String, dynamic>),
);
}

View File

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

View File

@@ -0,0 +1,68 @@
class LikeInfoV3 {
int? totalLikes;
bool? clickBlock;
bool? countBlock;
String? guildEmoText;
String? guildDmText;
String? likeDmText;
List<String>? handIcons;
List<String>? dmIcons;
String? eggshellsIcon;
int? countShowTime;
String? processIcon;
String? processColor;
int? reportClickLimit;
int? reportTimeMin;
int? reportTimeMax;
String? icon;
double? cooldown;
bool? handUseFace;
List<String>? guideIconUrls;
double? guideIconRatio;
LikeInfoV3({
this.totalLikes,
this.clickBlock,
this.countBlock,
this.guildEmoText,
this.guildDmText,
this.likeDmText,
this.handIcons,
this.dmIcons,
this.eggshellsIcon,
this.countShowTime,
this.processIcon,
this.processColor,
this.reportClickLimit,
this.reportTimeMin,
this.reportTimeMax,
this.icon,
this.cooldown,
this.handUseFace,
this.guideIconUrls,
this.guideIconRatio,
});
factory LikeInfoV3.fromJson(Map<String, dynamic> json) => LikeInfoV3(
totalLikes: json['total_likes'] as int?,
clickBlock: json['click_block'] as bool?,
countBlock: json['count_block'] as bool?,
guildEmoText: json['guild_emo_text'] as String?,
guildDmText: json['guild_dm_text'] as String?,
likeDmText: json['like_dm_text'] as String?,
handIcons: (json['hand_icons'] as List?)?.cast(),
dmIcons: (json['dm_icons'] as List?)?.cast(),
eggshellsIcon: json['eggshells_icon'] as String?,
countShowTime: json['count_show_time'] as int?,
processIcon: json['process_icon'] as String?,
processColor: json['process_color'] as String?,
reportClickLimit: json['report_click_limit'] as int?,
reportTimeMin: json['report_time_min'] as int?,
reportTimeMax: json['report_time_max'] as int?,
icon: json['icon'] as String?,
cooldown: (json['cooldown'] as num?)?.toDouble(),
handUseFace: json['hand_use_face'] as bool?,
guideIconUrls: (json['guide_icon_urls'] as List?)?.cast(),
guideIconRatio: (json['guide_icon_ratio'] as num?)?.toDouble(),
);
}

View File

@@ -0,0 +1,26 @@
class NewSwitchInfo {
int? roomInfoPopularity;
int? roomTab;
int? roomPlayerWatermark;
int? roomRecommendLiveOff;
int? brandUserCardSwitch;
int? brandFollowSwitch;
NewSwitchInfo({
this.roomInfoPopularity,
this.roomTab,
this.roomPlayerWatermark,
this.roomRecommendLiveOff,
this.brandUserCardSwitch,
this.brandFollowSwitch,
});
factory NewSwitchInfo.fromJson(Map<String, dynamic> json) => NewSwitchInfo(
roomInfoPopularity: json['room-info-popularity'] as int?,
roomTab: json['room-tab'] as int?,
roomPlayerWatermark: json['room-player-watermark'] as int?,
roomRecommendLiveOff: json['room-recommend-live_off'] as int?,
brandUserCardSwitch: json['brand-user-card-switch'] as int?,
brandFollowSwitch: json['brand-follow-switch'] as int?,
);
}

View File

@@ -0,0 +1,13 @@
class NewsInfo {
int? uid;
String? ctime;
String? content;
NewsInfo({this.uid, this.ctime, this.content});
factory NewsInfo.fromJson(Map<String, dynamic> json) => NewsInfo(
uid: json['uid'] as int?,
ctime: json['ctime'] as String?,
content: json['content'] as String?,
);
}

View File

@@ -0,0 +1,23 @@
class OfficialInfo {
int? role;
String? title;
String? desc;
int? isNft;
String? nftDmark;
OfficialInfo({
this.role,
this.title,
this.desc,
this.isNft,
this.nftDmark,
});
factory OfficialInfo.fromJson(Map<String, dynamic> json) => OfficialInfo(
role: json['role'] as int?,
title: json['title'] as String?,
desc: json['desc'] as String?,
isNft: json['is_nft'] as int?,
nftDmark: json['nft_dmark'] as String?,
);
}

View File

@@ -0,0 +1,13 @@
import 'package:PiliPlus/models_new/live/live_room_info_h5/frame.dart';
class Pendants {
Frame? frame;
Pendants({this.frame});
factory Pendants.fromJson(Map<String, dynamic> json) => Pendants(
frame: json['frame'] == null
? null
: Frame.fromJson(json['frame'] as Map<String, dynamic>),
);
}

View File

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

View File

@@ -0,0 +1,66 @@
import 'package:PiliPlus/models_new/live/live_room_info_h5/pendants.dart';
class RoomInfo {
int? uid;
int? roomId;
String? title;
String? cover;
String? description;
int? liveStatus;
int? liveStartTime;
int? areaId;
String? areaName;
int? parentAreaId;
String? parentAreaName;
int? online;
String? keyframe;
String? background;
String? appBackground;
Pendants? pendants;
String? subSessionKey;
String? liveId;
RoomInfo({
this.uid,
this.roomId,
this.title,
this.cover,
this.description,
this.liveStatus,
this.liveStartTime,
this.areaId,
this.areaName,
this.parentAreaId,
this.parentAreaName,
this.online,
this.keyframe,
this.background,
this.appBackground,
this.pendants,
this.subSessionKey,
this.liveId,
});
factory RoomInfo.fromJson(Map<String, dynamic> json) => RoomInfo(
uid: json['uid'] as int?,
roomId: json['room_id'] as int?,
title: json['title'] as String?,
cover: json['cover'] as String?,
description: json['description'] as String?,
liveStatus: json['live_status'] as int?,
liveStartTime: json['live_start_time'] as int?,
areaId: json['area_id'] as int?,
areaName: json['area_name'] as String?,
parentAreaId: json['parent_area_id'] as int?,
parentAreaName: json['parent_area_name'] as String?,
online: json['online'] as int?,
keyframe: json['keyframe'] as String?,
background: json['background'] as String?,
appBackground: json['app_background'] as String?,
pendants: json['pendants'] == null
? null
: Pendants.fromJson(json['pendants'] as Map<String, dynamic>),
subSessionKey: json['sub_session_key'] as String?,
liveId: json['live_id'] as String?,
);
}