mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-12 12:20:13 +08:00
@@ -1,21 +1,14 @@
|
||||
import 'package:PiliPlus/models_new/space/space/episodic_button.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/order.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/item.dart';
|
||||
|
||||
class Archive {
|
||||
EpisodicButton? episodicButton;
|
||||
List<Order>? order;
|
||||
int? count;
|
||||
List<SpaceArchiveItem>? item;
|
||||
|
||||
Archive({this.episodicButton, this.order, this.count, this.item});
|
||||
Archive({this.order, this.count, this.item});
|
||||
|
||||
factory Archive.fromJson(Map<String, dynamic> json) => Archive(
|
||||
episodicButton: json['episodic_button'] == null
|
||||
? null
|
||||
: EpisodicButton.fromJson(
|
||||
json['episodic_button'] as Map<String, dynamic>,
|
||||
),
|
||||
order: (json['order'] as List<dynamic>?)
|
||||
?.map((e) => Order.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
class AttentionTip {
|
||||
int? cardNum;
|
||||
String? tip;
|
||||
|
||||
AttentionTip({this.cardNum, this.tip});
|
||||
|
||||
factory AttentionTip.fromJson(Map<String, dynamic> json) => AttentionTip(
|
||||
cardNum: json['card_num'] as int?,
|
||||
tip: json['tip'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/nameplate.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/official_verify.dart';
|
||||
|
||||
class Author {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
Pendant? pendant;
|
||||
OfficialVerify? officialVerify;
|
||||
Nameplate? nameplate;
|
||||
Vip? vip;
|
||||
|
||||
Author({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.face,
|
||||
this.pendant,
|
||||
this.officialVerify,
|
||||
this.nameplate,
|
||||
this.vip,
|
||||
});
|
||||
|
||||
factory Author.fromJson(Map<String, dynamic> json) => Author(
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
pendant: json['pendant'] == null
|
||||
? null
|
||||
: Pendant.fromJson(json['pendant'] as Map<String, dynamic>),
|
||||
officialVerify: json['official_verify'] == null
|
||||
? null
|
||||
: OfficialVerify.fromJson(
|
||||
json['official_verify'] as Map<String, dynamic>,
|
||||
),
|
||||
nameplate: json['nameplate'] == null
|
||||
? null
|
||||
: Nameplate.fromJson(json['nameplate'] as Map<String, dynamic>),
|
||||
vip: json['vip'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
class Badge {
|
||||
String? text;
|
||||
String? textColor;
|
||||
String? textColorNight;
|
||||
String? bgColor;
|
||||
String? bgColorNight;
|
||||
String? borderColor;
|
||||
String? borderColorNight;
|
||||
int? bgStyle;
|
||||
|
||||
Badge({
|
||||
this.text,
|
||||
this.textColor,
|
||||
this.textColorNight,
|
||||
this.bgColor,
|
||||
this.bgColorNight,
|
||||
this.borderColor,
|
||||
this.borderColorNight,
|
||||
this.bgStyle,
|
||||
});
|
||||
|
||||
factory Badge.fromJson(Map<String, dynamic> json) => Badge(
|
||||
text: json['text'] as String?,
|
||||
textColor: json['text_color'] as String?,
|
||||
textColorNight: json['text_color_night'] as String?,
|
||||
bgColor: json['bg_color'] as String?,
|
||||
bgColorNight: json['bg_color_night'] as String?,
|
||||
borderColor: json['border_color'] as String?,
|
||||
borderColorNight: json['border_color_night'] as String?,
|
||||
bgStyle: json['bg_style'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
class Button {
|
||||
int? type;
|
||||
String? text;
|
||||
String? jumpUrl;
|
||||
|
||||
Button({this.type, this.text, this.jumpUrl});
|
||||
|
||||
factory Button.fromJson(Map<String, dynamic> json) => Button(
|
||||
type: json['type'] as int?,
|
||||
text: json['text'] as String?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,42 +1,28 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/achieve.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/entrance.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/followings_followed_upper.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/honours.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/level_info.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/likes.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/live_fans_wearing.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/nameplate.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/nft_certificate.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/official_verify.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/pr_info.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/profession_verify.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/relation.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/space_tag.dart';
|
||||
|
||||
class SpaceCard {
|
||||
String? mid;
|
||||
String? name;
|
||||
bool? approve;
|
||||
String? rank;
|
||||
String? face;
|
||||
String? displayRank;
|
||||
int? regtime;
|
||||
int? spacesta;
|
||||
String? birthday;
|
||||
String? place;
|
||||
String? description;
|
||||
int? article;
|
||||
dynamic attentions;
|
||||
int? fans;
|
||||
int? friend;
|
||||
int? attention;
|
||||
String? sign;
|
||||
LevelInfo? levelInfo;
|
||||
Pendant? pendant;
|
||||
Nameplate? nameplate;
|
||||
OfficialVerify? officialVerify;
|
||||
ProfessionVerify? professionVerify;
|
||||
Vip? vip;
|
||||
int? silence;
|
||||
int? endTime;
|
||||
@@ -44,45 +30,25 @@ class SpaceCard {
|
||||
Likes? likes;
|
||||
Achieve? achieve;
|
||||
SpaceRelation? relation;
|
||||
int? isDeleted;
|
||||
Honours? honours;
|
||||
LiveFansWearing? liveFansWearing;
|
||||
List<SpaceTag>? spaceTag;
|
||||
int? faceNftNew;
|
||||
bool? hasFaceNft;
|
||||
NftCertificate? nftCertificate;
|
||||
Entrance? entrance;
|
||||
String? nftId;
|
||||
dynamic nftFaceIcon;
|
||||
String? digitalId;
|
||||
int? digitalType;
|
||||
bool? hasDigitalAsset;
|
||||
SpacePrInfo? prInfo;
|
||||
FollowingsFollowedUpper? followingsFollowedUpper;
|
||||
|
||||
SpaceCard({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.approve,
|
||||
this.rank,
|
||||
this.face,
|
||||
this.displayRank,
|
||||
this.regtime,
|
||||
this.spacesta,
|
||||
this.birthday,
|
||||
this.place,
|
||||
this.description,
|
||||
this.article,
|
||||
this.attentions,
|
||||
this.fans,
|
||||
this.friend,
|
||||
this.attention,
|
||||
this.sign,
|
||||
this.levelInfo,
|
||||
this.pendant,
|
||||
this.nameplate,
|
||||
this.officialVerify,
|
||||
this.professionVerify,
|
||||
this.vip,
|
||||
this.silence,
|
||||
this.endTime,
|
||||
@@ -90,19 +56,8 @@ class SpaceCard {
|
||||
this.likes,
|
||||
this.achieve,
|
||||
this.relation,
|
||||
this.isDeleted,
|
||||
this.honours,
|
||||
this.liveFansWearing,
|
||||
this.spaceTag,
|
||||
this.faceNftNew,
|
||||
this.hasFaceNft,
|
||||
this.nftCertificate,
|
||||
this.entrance,
|
||||
this.nftId,
|
||||
this.nftFaceIcon,
|
||||
this.digitalId,
|
||||
this.digitalType,
|
||||
this.hasDigitalAsset,
|
||||
this.prInfo,
|
||||
this.followingsFollowedUpper,
|
||||
});
|
||||
@@ -110,17 +65,10 @@ class SpaceCard {
|
||||
factory SpaceCard.fromJson(Map<String, dynamic> json) => SpaceCard(
|
||||
mid: json['mid'] as String?,
|
||||
name: json['name'] as String?,
|
||||
approve: json['approve'] as bool?,
|
||||
rank: json['rank'] as String?,
|
||||
face: json['face'] as String?,
|
||||
displayRank: json['DisplayRank'] as String?,
|
||||
regtime: json['regtime'] as int?,
|
||||
spacesta: json['spacesta'] as int?,
|
||||
birthday: json['birthday'] as String?,
|
||||
place: json['place'] as String?,
|
||||
description: json['description'] as String?,
|
||||
article: json['article'] as int?,
|
||||
attentions: json['attentions'] as dynamic,
|
||||
fans: json['fans'] as int?,
|
||||
friend: json['friend'] as int?,
|
||||
attention: json['attention'] as int?,
|
||||
@@ -131,19 +79,11 @@ class SpaceCard {
|
||||
pendant: json['pendant'] == null
|
||||
? null
|
||||
: Pendant.fromJson(json['pendant'] as Map<String, dynamic>),
|
||||
nameplate: json['nameplate'] == null
|
||||
? null
|
||||
: Nameplate.fromJson(json['nameplate'] as Map<String, dynamic>),
|
||||
officialVerify: json['official_verify'] == null
|
||||
? null
|
||||
: OfficialVerify.fromJson(
|
||||
json['official_verify'] as Map<String, dynamic>,
|
||||
),
|
||||
professionVerify: json['profession_verify'] == null
|
||||
? null
|
||||
: ProfessionVerify.fromJson(
|
||||
json['profession_verify'] as Map<String, dynamic>,
|
||||
),
|
||||
vip: json['vip'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
|
||||
@@ -159,10 +99,6 @@ class SpaceCard {
|
||||
relation: json['relation'] == null
|
||||
? null
|
||||
: SpaceRelation.fromJson(json['relation'] as Map<String, dynamic>),
|
||||
isDeleted: json['is_deleted'] as int?,
|
||||
honours: json['honours'] == null
|
||||
? null
|
||||
: Honours.fromJson(json['honours'] as Map<String, dynamic>),
|
||||
liveFansWearing: json['live_fans_wearing'] == null
|
||||
? null
|
||||
: LiveFansWearing.fromJson(
|
||||
@@ -172,21 +108,6 @@ class SpaceCard {
|
||||
?.where((e) => const ['location', 'real_name'].contains(e['type']))
|
||||
.map((e) => SpaceTag.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
faceNftNew: json['face_nft_new'] as int?,
|
||||
hasFaceNft: json['has_face_nft'] as bool?,
|
||||
nftCertificate: json['nft_certificate'] == null
|
||||
? null
|
||||
: NftCertificate.fromJson(
|
||||
json['nft_certificate'] as Map<String, dynamic>,
|
||||
),
|
||||
entrance: json['entrance'] == null
|
||||
? null
|
||||
: Entrance.fromJson(json['entrance'] as Map<String, dynamic>),
|
||||
nftId: json['nft_id'] as String?,
|
||||
nftFaceIcon: json['nft_face_icon'] as dynamic,
|
||||
digitalId: json['digital_id'] as String?,
|
||||
digitalType: json['digital_type'] as int?,
|
||||
hasDigitalAsset: json['has_digital_asset'] as bool?,
|
||||
prInfo: json['pr_info'] == null
|
||||
? null
|
||||
: SpacePrInfo.fromJson(json['pr_info'] as Map<String, dynamic>),
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
class Category {
|
||||
int? id;
|
||||
int? parentId;
|
||||
String? name;
|
||||
|
||||
Category({this.id, this.parentId, this.name});
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json) => Category(
|
||||
id: json['id'] as int?,
|
||||
parentId: json['parent_id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,17 +1,10 @@
|
||||
import 'package:PiliPlus/models_new/space/space/preference.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/top.dart';
|
||||
|
||||
class CollectionTopSimple {
|
||||
Top? top;
|
||||
int? max;
|
||||
Preference? preference;
|
||||
String? collectionCompletedUrl;
|
||||
|
||||
CollectionTopSimple({
|
||||
this.top,
|
||||
this.max,
|
||||
this.preference,
|
||||
this.collectionCompletedUrl,
|
||||
});
|
||||
|
||||
factory CollectionTopSimple.fromJson(Map<String, dynamic> json) {
|
||||
@@ -19,11 +12,6 @@ class CollectionTopSimple {
|
||||
top: json['top'] == null
|
||||
? null
|
||||
: Top.fromJson(json['top'] as Map<String, dynamic>),
|
||||
max: json['max'] as int?,
|
||||
preference: json['preference'] == null
|
||||
? null
|
||||
: Preference.fromJson(json['preference'] as Map<String, dynamic>),
|
||||
collectionCompletedUrl: json['collection_completed_url'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/space/space/day.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/night.dart';
|
||||
|
||||
class ColorConfig {
|
||||
bool? isDarkModeAware;
|
||||
Day? day;
|
||||
Night? night;
|
||||
|
||||
ColorConfig({this.isDarkModeAware, this.day, this.night});
|
||||
|
||||
factory ColorConfig.fromJson(Map<String, dynamic> json) => ColorConfig(
|
||||
isDarkModeAware: json['is_dark_mode_aware'] as bool?,
|
||||
day: json['day'] == null
|
||||
? null
|
||||
: Day.fromJson(json['day'] as Map<String, dynamic>),
|
||||
night: json['night'] == null
|
||||
? null
|
||||
: Night.fromJson(json['night'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class Colour {
|
||||
String? dark;
|
||||
String? normal;
|
||||
|
||||
Colour({this.dark, this.normal});
|
||||
|
||||
factory Colour.fromJson(Map<String, dynamic> json) => Colour(
|
||||
dark: json['dark'] as String?,
|
||||
normal: json['normal'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class ContainerSize {
|
||||
double? width;
|
||||
double? height;
|
||||
|
||||
ContainerSize({this.width, this.height});
|
||||
|
||||
factory ContainerSize.fromJson(Map<String, dynamic> json) => ContainerSize(
|
||||
width: (json['width'] as num?)?.toDouble(),
|
||||
height: (json['height'] as num?)?.toDouble(),
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
class Cover {
|
||||
String? url;
|
||||
|
||||
Cover({this.url});
|
||||
|
||||
factory Cover.fromJson(Map<String, dynamic> json) => Cover(
|
||||
url: json['url'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,34 +1,28 @@
|
||||
import 'package:PiliPlus/models_new/space/space/archive.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/article.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/attention_tip.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/audios.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/card.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/cheese.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/coin_archive.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/comic.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/elec.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/entry.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/favourite2.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/guard.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/images.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/like_archive.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/live.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/nft_show_module.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/play_game.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/reservation_card_list.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/season.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/series.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/setting.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/space_button_list.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/tab.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/tab2.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/ugc_season.dart';
|
||||
|
||||
class SpaceData {
|
||||
int? relation;
|
||||
int? guestRelation;
|
||||
int? medal;
|
||||
String? defaultTab;
|
||||
bool? isParams;
|
||||
SpaceSetting? setting;
|
||||
SpaceTab? tab;
|
||||
SpaceCard? card;
|
||||
@@ -37,7 +31,6 @@ class SpaceData {
|
||||
Elec? elec;
|
||||
Archive? archive;
|
||||
SpaceSeries? series;
|
||||
PlayGame? playGame;
|
||||
Article? article;
|
||||
SpaceSeason? season;
|
||||
CoinArchive? coinArchive;
|
||||
@@ -46,26 +39,17 @@ class SpaceData {
|
||||
Favourite2? favourite2;
|
||||
Comic? comic;
|
||||
UgcSeason? ugcSeason;
|
||||
int? adShopType;
|
||||
String? adContainerPath;
|
||||
Cheese? cheese;
|
||||
Guard? guard;
|
||||
AttentionTip? attentionTip;
|
||||
NftShowModule? nftShowModule;
|
||||
List<SpaceTab2>? tab2;
|
||||
dynamic nftFaceButton;
|
||||
dynamic digitalButton;
|
||||
List<Entry>? entry;
|
||||
List<SpaceButtonList>? spaceButtonList;
|
||||
int? relSpecial;
|
||||
bool? hasItem;
|
||||
List<ReservationCardItem>? reservationCardList;
|
||||
|
||||
SpaceData({
|
||||
this.relation,
|
||||
this.guestRelation,
|
||||
this.medal,
|
||||
this.defaultTab,
|
||||
this.isParams,
|
||||
this.setting,
|
||||
this.tab,
|
||||
this.card,
|
||||
@@ -74,7 +58,6 @@ class SpaceData {
|
||||
this.elec,
|
||||
this.archive,
|
||||
this.series,
|
||||
this.playGame,
|
||||
this.article,
|
||||
this.season,
|
||||
this.coinArchive,
|
||||
@@ -85,22 +68,15 @@ class SpaceData {
|
||||
this.ugcSeason,
|
||||
this.cheese,
|
||||
this.guard,
|
||||
this.attentionTip,
|
||||
this.nftShowModule,
|
||||
this.tab2,
|
||||
this.nftFaceButton,
|
||||
this.digitalButton,
|
||||
this.entry,
|
||||
this.spaceButtonList,
|
||||
this.relSpecial,
|
||||
this.reservationCardList,
|
||||
});
|
||||
|
||||
SpaceData.fromJson(Map<String, dynamic> json) {
|
||||
relation = json['relation'] as int?;
|
||||
guestRelation = json['guest_relation'] as int?;
|
||||
medal = json['medal'] as int?;
|
||||
defaultTab = json['default_tab'] as String?;
|
||||
isParams = json['is_params'] as bool?;
|
||||
setting = json['setting'] == null
|
||||
? null
|
||||
: SpaceSetting.fromJson(json['setting'] as Map<String, dynamic>);
|
||||
@@ -125,9 +101,6 @@ class SpaceData {
|
||||
series = json['series'] == null
|
||||
? null
|
||||
: SpaceSeries.fromJson(json['series'] as Map<String, dynamic>);
|
||||
playGame = json['play_game'] == null
|
||||
? null
|
||||
: PlayGame.fromJson(json['play_game'] as Map<String, dynamic>);
|
||||
article = json['article'] == null
|
||||
? null
|
||||
: Article.fromJson(json['article'] as Map<String, dynamic>);
|
||||
@@ -158,26 +131,13 @@ class SpaceData {
|
||||
guard = json['guard'] == null
|
||||
? null
|
||||
: Guard.fromJson(json['guard'] as Map<String, dynamic>);
|
||||
attentionTip = json['attention_tip'] == null
|
||||
? null
|
||||
: AttentionTip.fromJson(json['attention_tip'] as Map<String, dynamic>);
|
||||
nftShowModule = json['nft_show_module'] == null
|
||||
? null
|
||||
: NftShowModule.fromJson(
|
||||
json['nft_show_module'] as Map<String, dynamic>,
|
||||
);
|
||||
tab2 = (json['tab2'] as List<dynamic>?)
|
||||
?.map((e) => SpaceTab2.fromJson(e as Map<String, dynamic>))
|
||||
.toList();
|
||||
nftFaceButton = json['nft_face_button'] as dynamic;
|
||||
digitalButton = json['digital_button'] as dynamic;
|
||||
entry = (json['entry'] as List<dynamic>?)
|
||||
?.map((e) => Entry.fromJson(e as Map<String, dynamic>))
|
||||
.toList();
|
||||
spaceButtonList = (json['space_button_list'] as List<dynamic>?)
|
||||
?.map((e) => SpaceButtonList.fromJson(e as Map<String, dynamic>))
|
||||
.toList();
|
||||
relSpecial = (json['rel_special'] as num?)?.toInt();
|
||||
reservationCardList = (json['reservation_card_list'] as List<dynamic>?)
|
||||
?.map((e) => ReservationCardItem.fromJson(e))
|
||||
.toList();
|
||||
hasItem =
|
||||
archive?.item?.isNotEmpty == true ||
|
||||
favourite2?.item?.isNotEmpty == true ||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
class Day {
|
||||
String? argb;
|
||||
|
||||
Day({this.argb});
|
||||
|
||||
factory Day.fromJson(Map<String, dynamic> json) => Day(
|
||||
argb: json['argb'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
class DigitalInfo {
|
||||
bool? active;
|
||||
String? jumpUrl;
|
||||
int? nftType;
|
||||
int? backgroundHandle;
|
||||
String? animationFirstFrame;
|
||||
dynamic musicAlbum;
|
||||
dynamic animation;
|
||||
String? nftRegionTitle;
|
||||
int? cardId;
|
||||
String? cutSpaceBg;
|
||||
int? partType;
|
||||
String? itemJumpUrl;
|
||||
|
||||
DigitalInfo({
|
||||
this.active,
|
||||
this.jumpUrl,
|
||||
this.nftType,
|
||||
this.backgroundHandle,
|
||||
this.animationFirstFrame,
|
||||
this.musicAlbum,
|
||||
this.animation,
|
||||
this.nftRegionTitle,
|
||||
this.cardId,
|
||||
this.cutSpaceBg,
|
||||
this.partType,
|
||||
this.itemJumpUrl,
|
||||
});
|
||||
|
||||
factory DigitalInfo.fromJson(Map<String, dynamic> json) => DigitalInfo(
|
||||
active: json['active'] as bool?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
nftType: json['nft_type'] as int?,
|
||||
backgroundHandle: json['background_handle'] as int?,
|
||||
animationFirstFrame: json['animation_first_frame'] as String?,
|
||||
musicAlbum: json['music_album'] as dynamic,
|
||||
animation: json['animation'] as dynamic,
|
||||
nftRegionTitle: json['nft_region_title'] as String?,
|
||||
cardId: json['card_id'] as int?,
|
||||
cutSpaceBg: json['cut_space_bg'] as String?,
|
||||
partType: json['part_type'] as int?,
|
||||
itemJumpUrl: json['item_jump_url'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
class Display {
|
||||
String? bgThemeLight;
|
||||
String? bgThemeNight;
|
||||
String? nftPoster;
|
||||
String? nftRaw;
|
||||
|
||||
Display({
|
||||
this.bgThemeLight,
|
||||
this.bgThemeNight,
|
||||
this.nftPoster,
|
||||
this.nftRaw,
|
||||
});
|
||||
|
||||
factory Display.fromJson(Map<String, dynamic> json) => Display(
|
||||
bgThemeLight: json['bg_theme_light'] as String?,
|
||||
bgThemeNight: json['bg_theme_night'] as String?,
|
||||
nftPoster: json['nft_poster'] as String?,
|
||||
nftRaw: json['nft_raw'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/space/space/color_config.dart';
|
||||
|
||||
class Draw {
|
||||
int? drawType;
|
||||
int? fillMode;
|
||||
ColorConfig? colorConfig;
|
||||
|
||||
Draw({this.drawType, this.fillMode, this.colorConfig});
|
||||
|
||||
factory Draw.fromJson(Map<String, dynamic> json) => Draw(
|
||||
drawType: json['draw_type'] as int?,
|
||||
fillMode: json['fill_mode'] as int?,
|
||||
colorConfig: json['color_config'] == null
|
||||
? null
|
||||
: ColorConfig.fromJson(json['color_config'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/space/space/draw.dart';
|
||||
|
||||
class DrawSrc {
|
||||
int? srcType;
|
||||
Draw? draw;
|
||||
|
||||
DrawSrc({this.srcType, this.draw});
|
||||
|
||||
factory DrawSrc.fromJson(Map<String, dynamic> json) => DrawSrc(
|
||||
srcType: json['src_type'] as int?,
|
||||
draw: json['draw'] == null
|
||||
? null
|
||||
: Draw.fromJson(json['draw'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -1,54 +1,31 @@
|
||||
import 'package:PiliPlus/models_new/space/space/elec_set.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/list.dart';
|
||||
|
||||
class Elec {
|
||||
bool? show;
|
||||
int? total;
|
||||
int? count;
|
||||
int? elecNum;
|
||||
List<ListItem>? list;
|
||||
ElecSet? elecSet;
|
||||
int? state;
|
||||
String? upowerTitle;
|
||||
String? upowerJumpUrl;
|
||||
String? upowerIconUrl;
|
||||
int? upowerState;
|
||||
String? rankTitle;
|
||||
String? rankUrl;
|
||||
List<ElecItem>? list;
|
||||
|
||||
Elec({
|
||||
this.show,
|
||||
this.total,
|
||||
this.count,
|
||||
this.elecNum,
|
||||
this.list,
|
||||
this.elecSet,
|
||||
this.state,
|
||||
this.upowerTitle,
|
||||
this.upowerJumpUrl,
|
||||
this.upowerIconUrl,
|
||||
this.upowerState,
|
||||
this.rankTitle,
|
||||
this.rankUrl,
|
||||
});
|
||||
|
||||
factory Elec.fromJson(Map<String, dynamic> json) => Elec(
|
||||
show: json['show'] as bool?,
|
||||
total: json['total'] as int?,
|
||||
count: json['count'] as int?,
|
||||
elecNum: json['elec_num'] as int?,
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => ListItem.fromJson(e as Map<String, dynamic>))
|
||||
?.map((e) => ElecItem.fromJson(e))
|
||||
.toList(),
|
||||
elecSet: json['elec_set'] == null
|
||||
? null
|
||||
: ElecSet.fromJson(json['elec_set'] as Map<String, dynamic>),
|
||||
state: json['state'] as int?,
|
||||
upowerTitle: json['upower_title'] as String?,
|
||||
upowerJumpUrl: json['upower_jump_url'] as String?,
|
||||
upowerIconUrl: json['upower_icon_url'] as String?,
|
||||
upowerState: json['upower_state'] as int?,
|
||||
rankTitle: json['rank_title'] as String?,
|
||||
rankUrl: json['rank_url'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
class ElecItem {
|
||||
String? uname;
|
||||
String? avatar;
|
||||
|
||||
ElecItem({
|
||||
this.uname,
|
||||
this.avatar,
|
||||
});
|
||||
|
||||
factory ElecItem.fromJson(Map<String, dynamic> json) => ElecItem(
|
||||
uname: json['uname'] as String?,
|
||||
avatar: json['avatar'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
class ElecList {
|
||||
String? title;
|
||||
int? elecNum;
|
||||
int? isCustomize;
|
||||
String? bpNum;
|
||||
String? minBp;
|
||||
String? maxBp;
|
||||
int? bpNumFen;
|
||||
int? isDefault;
|
||||
int? minElec;
|
||||
int? maxElec;
|
||||
int? minBpFen;
|
||||
int? maxBpFen;
|
||||
|
||||
ElecList({
|
||||
this.title,
|
||||
this.elecNum,
|
||||
this.isCustomize,
|
||||
this.bpNum,
|
||||
this.minBp,
|
||||
this.maxBp,
|
||||
this.bpNumFen,
|
||||
this.isDefault,
|
||||
this.minElec,
|
||||
this.maxElec,
|
||||
this.minBpFen,
|
||||
this.maxBpFen,
|
||||
});
|
||||
|
||||
factory ElecList.fromJson(Map<String, dynamic> json) => ElecList(
|
||||
title: json['title'] as String?,
|
||||
elecNum: json['elec_num'] as int?,
|
||||
isCustomize: json['is_customize'] as int?,
|
||||
bpNum: json['bp_num'] as String?,
|
||||
minBp: json['min_bp'] as String?,
|
||||
maxBp: json['max_bp'] as String?,
|
||||
bpNumFen: json['bp_num_fen'] as int?,
|
||||
isDefault: json['is_default'] as int?,
|
||||
minElec: json['min_elec'] as int?,
|
||||
maxElec: json['max_elec'] as int?,
|
||||
minBpFen: json['min_bp_fen'] as int?,
|
||||
maxBpFen: json['max_bp_fen'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/space/space/elec_list.dart';
|
||||
|
||||
class ElecSet {
|
||||
int? elecTheme;
|
||||
int? rmbRate;
|
||||
int? integrityRate;
|
||||
int? roundMode;
|
||||
List<ElecList>? elecList;
|
||||
String? batteryItemDesc;
|
||||
|
||||
ElecSet({
|
||||
this.elecTheme,
|
||||
this.rmbRate,
|
||||
this.integrityRate,
|
||||
this.roundMode,
|
||||
this.elecList,
|
||||
this.batteryItemDesc,
|
||||
});
|
||||
|
||||
factory ElecSet.fromJson(Map<String, dynamic> json) => ElecSet(
|
||||
elecTheme: json['elec_theme'] as int?,
|
||||
rmbRate: json['rmb_rate'] as int?,
|
||||
integrityRate: json['integrity_rate'] as int?,
|
||||
roundMode: json['round_mode'] as int?,
|
||||
elecList: (json['elec_list'] as List<dynamic>?)
|
||||
?.map((e) => ElecList.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
batteryItemDesc: json['battery_item_desc'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
class Entrance {
|
||||
String? icon;
|
||||
String? jumpUrl;
|
||||
bool? isShowEntrance;
|
||||
|
||||
Entrance({this.icon, this.jumpUrl, this.isShowEntrance});
|
||||
|
||||
factory Entrance.fromJson(Map<String, dynamic> json) => Entrance(
|
||||
icon: json['icon'] as String?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
isShowEntrance: json['is_show_entrance'] as bool?,
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
class EntranceButton {
|
||||
String? uri;
|
||||
String? title;
|
||||
|
||||
EntranceButton({this.uri, this.title});
|
||||
|
||||
factory EntranceButton.fromJson(Map<String, dynamic> json) {
|
||||
return EntranceButton(
|
||||
uri: json['uri'] as String?,
|
||||
title: json['title'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
class Entry {
|
||||
String? icon;
|
||||
String? jumpLink;
|
||||
String? accessibility;
|
||||
bool? needLogin;
|
||||
|
||||
Entry({this.icon, this.jumpLink, this.accessibility, this.needLogin});
|
||||
|
||||
factory Entry.fromJson(Map<String, dynamic> json) => Entry(
|
||||
icon: json['icon'] as String?,
|
||||
jumpLink: json['jump_link'] as String?,
|
||||
accessibility: json['accessibility'] as String?,
|
||||
needLogin: json['need_login'] as bool?,
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
class EpisodicButton {
|
||||
String? text;
|
||||
String? uri;
|
||||
|
||||
EpisodicButton({this.text, this.uri});
|
||||
|
||||
factory EpisodicButton.fromJson(Map<String, dynamic> json) {
|
||||
return EpisodicButton(
|
||||
text: json['text'] as String?,
|
||||
uri: json['uri'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/space/space/card.dart';
|
||||
|
||||
class Extra {
|
||||
SpaceCard? card;
|
||||
int? salesType;
|
||||
int? upzoneEntranceType;
|
||||
String? upzoneEntranceReportId;
|
||||
|
||||
Extra({
|
||||
this.card,
|
||||
this.salesType,
|
||||
this.upzoneEntranceType,
|
||||
this.upzoneEntranceReportId,
|
||||
});
|
||||
|
||||
factory Extra.fromJson(Map<String, dynamic> json) => Extra(
|
||||
card: json['card'] == null
|
||||
? null
|
||||
: SpaceCard.fromJson(json['card'] as Map<String, dynamic>),
|
||||
salesType: json['sales_type'] as int?,
|
||||
upzoneEntranceType: json['upzone_entrance_type'] as int?,
|
||||
upzoneEntranceReportId: json['upzone_entrance_report_id'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/space/space/pos_spec.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/render_spec.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/size_spec.dart';
|
||||
|
||||
class GeneralSpec {
|
||||
PosSpec? posSpec;
|
||||
SizeSpec? sizeSpec;
|
||||
RenderSpec? renderSpec;
|
||||
|
||||
GeneralSpec({this.posSpec, this.sizeSpec, this.renderSpec});
|
||||
|
||||
factory GeneralSpec.fromJson(Map<String, dynamic> json) => GeneralSpec(
|
||||
posSpec: json['pos_spec'] == null
|
||||
? null
|
||||
: PosSpec.fromJson(json['pos_spec'] as Map<String, dynamic>),
|
||||
sizeSpec: json['size_spec'] == null
|
||||
? null
|
||||
: SizeSpec.fromJson(json['size_spec'] as Map<String, dynamic>),
|
||||
renderSpec: json['render_spec'] == null
|
||||
? null
|
||||
: RenderSpec.fromJson(json['render_spec'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -1,21 +1,21 @@
|
||||
import 'package:PiliPlus/models_new/space/space/item.dart';
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
|
||||
class Guard {
|
||||
String? uri;
|
||||
String? desc;
|
||||
String? highLight;
|
||||
List<Item>? item;
|
||||
String? buttonMsg;
|
||||
List<Owner>? item;
|
||||
|
||||
Guard({this.uri, this.desc, this.highLight, this.item, this.buttonMsg});
|
||||
Guard({
|
||||
this.uri,
|
||||
this.desc,
|
||||
this.item,
|
||||
});
|
||||
|
||||
factory Guard.fromJson(Map<String, dynamic> json) => Guard(
|
||||
uri: json['uri'] as String?,
|
||||
desc: json['desc'] as String?,
|
||||
highLight: json['high_light'] as String?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => Item.fromJson(e as Map<String, dynamic>))
|
||||
?.map((e) => Owner.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
buttonMsg: json['button_msg'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/space/space/colour.dart';
|
||||
|
||||
class Honours {
|
||||
Colour? colour;
|
||||
List<dynamic>? tags;
|
||||
|
||||
Honours({this.colour, this.tags});
|
||||
|
||||
factory Honours.fromJson(Map<String, dynamic> json) => Honours(
|
||||
colour: json['colour'] == null
|
||||
? null
|
||||
: Colour.fromJson(json['colour'] as Map<String, dynamic>),
|
||||
tags: json['tags'] as List<dynamic>?,
|
||||
);
|
||||
}
|
||||
@@ -1,47 +1,19 @@
|
||||
import 'package:PiliPlus/models_new/space/space/collection_top_simple.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/digital_info.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/entrance_button.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/purchase_button.dart';
|
||||
|
||||
class SpaceImages {
|
||||
String? imgUrl;
|
||||
String? nightImgurl;
|
||||
bool? goodsAvailable;
|
||||
PurchaseButton? purchaseButton;
|
||||
EntranceButton? entranceButton;
|
||||
DigitalInfo? digitalInfo;
|
||||
bool? showDigital;
|
||||
CollectionTopSimple? collectionTopSimple;
|
||||
|
||||
SpaceImages({
|
||||
this.imgUrl,
|
||||
this.nightImgurl,
|
||||
this.goodsAvailable,
|
||||
this.purchaseButton,
|
||||
this.entranceButton,
|
||||
this.digitalInfo,
|
||||
this.showDigital,
|
||||
this.collectionTopSimple,
|
||||
});
|
||||
|
||||
factory SpaceImages.fromJson(Map<String, dynamic> json) => SpaceImages(
|
||||
imgUrl: json['imgUrl'] as String?,
|
||||
nightImgurl: json['night_imgurl'] as String?,
|
||||
goodsAvailable: json['goods_available'] as bool?,
|
||||
purchaseButton: json['purchase_button'] == null
|
||||
? null
|
||||
: PurchaseButton.fromJson(
|
||||
json['purchase_button'] as Map<String, dynamic>,
|
||||
),
|
||||
entranceButton: json['entrance_button'] == null
|
||||
? null
|
||||
: EntranceButton.fromJson(
|
||||
json['entrance_button'] as Map<String, dynamic>,
|
||||
),
|
||||
digitalInfo: json['digital_info'] == null
|
||||
? null
|
||||
: DigitalInfo.fromJson(json['digital_info'] as Map<String, dynamic>),
|
||||
showDigital: json['show_digital'] as bool?,
|
||||
collectionTopSimple: json['collection_top_simple'] == null
|
||||
? null
|
||||
: CollectionTopSimple.fromJson(
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import 'package:PiliPlus/models_new/space/space/badge.dart';
|
||||
|
||||
class Item {
|
||||
String? title;
|
||||
String? subtitle;
|
||||
@@ -24,7 +22,6 @@ class Item {
|
||||
int? danmaku;
|
||||
int? ctime;
|
||||
int? ugcPay;
|
||||
List<Badge>? badges;
|
||||
String? author;
|
||||
bool? state;
|
||||
String? bvid;
|
||||
@@ -58,7 +55,6 @@ class Item {
|
||||
this.danmaku,
|
||||
this.ctime,
|
||||
this.ugcPay,
|
||||
this.badges,
|
||||
this.author,
|
||||
this.state,
|
||||
this.bvid,
|
||||
@@ -93,9 +89,6 @@ class Item {
|
||||
danmaku: json['danmaku'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
ugcPay: json['ugc_pay'] as int?,
|
||||
badges: (json['badges'] as List<dynamic>?)
|
||||
?.map((e) => Badge.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
author: json['author'] as String?,
|
||||
state: json['state'] as bool?,
|
||||
bvid: json['bvid'] as String?,
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
class Label {
|
||||
String? path;
|
||||
String? text;
|
||||
String? labelTheme;
|
||||
String? textColor;
|
||||
int? bgStyle;
|
||||
String? bgColor;
|
||||
String? borderColor;
|
||||
String? image;
|
||||
|
||||
Label({
|
||||
this.path,
|
||||
this.text,
|
||||
this.labelTheme,
|
||||
this.textColor,
|
||||
this.bgStyle,
|
||||
this.bgColor,
|
||||
this.borderColor,
|
||||
this.image,
|
||||
});
|
||||
|
||||
factory Label.fromJson(Map<String, dynamic> json) => Label(
|
||||
path: json['path'] as String?,
|
||||
text: json['text'] as String?,
|
||||
labelTheme: json['label_theme'] as String?,
|
||||
textColor: json['text_color'] as String?,
|
||||
bgStyle: json['bg_style'] as int?,
|
||||
bgColor: json['bg_color'] as String?,
|
||||
borderColor: json['border_color'] as String?,
|
||||
image: json['image'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,32 +1,14 @@
|
||||
import 'package:PiliPlus/models_new/space/space/senior_inquiry.dart';
|
||||
|
||||
class LevelInfo {
|
||||
int? currentLevel;
|
||||
int? currentMin;
|
||||
int? currentExp;
|
||||
dynamic nextExp;
|
||||
int? identity;
|
||||
SeniorInquiry? seniorInquiry;
|
||||
|
||||
LevelInfo({
|
||||
this.currentLevel,
|
||||
this.currentMin,
|
||||
this.currentExp,
|
||||
this.nextExp,
|
||||
this.identity,
|
||||
this.seniorInquiry,
|
||||
});
|
||||
|
||||
factory LevelInfo.fromJson(Map<String, dynamic> json) => LevelInfo(
|
||||
currentLevel: json['current_level'] as int?,
|
||||
currentMin: json['current_min'] as int?,
|
||||
currentExp: json['current_exp'] as int?,
|
||||
nextExp: json['next_exp'] as dynamic,
|
||||
identity: json['identity'] as int?,
|
||||
seniorInquiry: json['senior_inquiry'] == null
|
||||
? null
|
||||
: SeniorInquiry.fromJson(
|
||||
json['senior_inquiry'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ class ListItem {
|
||||
int? trendType;
|
||||
String? message;
|
||||
int? mid;
|
||||
dynamic vipInfo;
|
||||
String? uname;
|
||||
String? avatar;
|
||||
|
||||
@@ -14,7 +13,6 @@ class ListItem {
|
||||
this.trendType,
|
||||
this.message,
|
||||
this.mid,
|
||||
this.vipInfo,
|
||||
this.uname,
|
||||
this.avatar,
|
||||
});
|
||||
@@ -25,7 +23,6 @@ class ListItem {
|
||||
trendType: json['trend_type'] as int?,
|
||||
message: json['message'] as String?,
|
||||
mid: json['mid'] as int?,
|
||||
vipInfo: json['vip_info'] as dynamic,
|
||||
uname: json['uname'] as String?,
|
||||
avatar: json['avatar'] as String?,
|
||||
);
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
class Media {
|
||||
int? score;
|
||||
int? mediaId;
|
||||
String? title;
|
||||
String? cover;
|
||||
String? area;
|
||||
int? typeId;
|
||||
String? typeName;
|
||||
int? spoiler;
|
||||
|
||||
Media({
|
||||
this.score,
|
||||
this.mediaId,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.area,
|
||||
this.typeId,
|
||||
this.typeName,
|
||||
this.spoiler,
|
||||
});
|
||||
|
||||
factory Media.fromJson(Map<String, dynamic> json) => Media(
|
||||
score: json['score'] as int?,
|
||||
mediaId: json['media_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
area: json['area'] as String?,
|
||||
typeId: json['type_id'] as int?,
|
||||
typeName: json['type_name'] as String?,
|
||||
spoiler: json['spoiler'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
class Nameplate {
|
||||
int? nid;
|
||||
String? name;
|
||||
String? image;
|
||||
String? imageSmall;
|
||||
String? level;
|
||||
String? condition;
|
||||
|
||||
Nameplate({
|
||||
this.nid,
|
||||
this.name,
|
||||
this.image,
|
||||
this.imageSmall,
|
||||
this.level,
|
||||
this.condition,
|
||||
});
|
||||
|
||||
factory Nameplate.fromJson(Map<String, dynamic> json) => Nameplate(
|
||||
nid: json['nid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
image: json['image'] as String?,
|
||||
imageSmall: json['image_small'] as String?,
|
||||
level: json['level'] as String?,
|
||||
condition: json['condition'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/space/space/display.dart';
|
||||
|
||||
class Nft {
|
||||
String? itemName;
|
||||
String? issuer;
|
||||
String? serialNumber;
|
||||
String? detailUrl;
|
||||
int? nftStatus;
|
||||
Display? display;
|
||||
|
||||
Nft({
|
||||
this.itemName,
|
||||
this.issuer,
|
||||
this.serialNumber,
|
||||
this.detailUrl,
|
||||
this.nftStatus,
|
||||
this.display,
|
||||
});
|
||||
|
||||
factory Nft.fromJson(Map<String, dynamic> json) => Nft(
|
||||
itemName: json['item_name'] as String?,
|
||||
issuer: json['issuer'] as String?,
|
||||
serialNumber: json['serial_number'] as String?,
|
||||
detailUrl: json['detail_url'] as String?,
|
||||
nftStatus: json['nft_status'] as int?,
|
||||
display: json['display'] == null
|
||||
? null
|
||||
: Display.fromJson(json['display'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class NftCertificate {
|
||||
String? detailUrl;
|
||||
|
||||
NftCertificate({this.detailUrl});
|
||||
|
||||
factory NftCertificate.fromJson(Map<String, dynamic> json) {
|
||||
return NftCertificate(
|
||||
detailUrl: json['detail_url'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/space/space/nft.dart';
|
||||
|
||||
class NftShowModule {
|
||||
int? total;
|
||||
String? artsMoreJump;
|
||||
List<Nft>? nfts;
|
||||
String? floorTitle;
|
||||
|
||||
NftShowModule({
|
||||
this.total,
|
||||
this.artsMoreJump,
|
||||
this.nfts,
|
||||
this.floorTitle,
|
||||
});
|
||||
|
||||
factory NftShowModule.fromJson(Map<String, dynamic> json) => NftShowModule(
|
||||
total: json['total'] as int?,
|
||||
artsMoreJump: json['arts_more_jump'] as String?,
|
||||
nfts: (json['nfts'] as List<dynamic>?)
|
||||
?.map((e) => Nft.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
floorTitle: json['floor_title'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
class Night {
|
||||
String? argb;
|
||||
|
||||
Night({this.argb});
|
||||
|
||||
factory Night.fromJson(Map<String, dynamic> json) => Night(
|
||||
argb: json['argb'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,28 +1,9 @@
|
||||
class OfficialVerify {
|
||||
int? type;
|
||||
String? desc;
|
||||
int? role;
|
||||
String? title;
|
||||
String? icon;
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class OfficialVerify extends BaseOfficialVerify {
|
||||
String? spliceTitle;
|
||||
|
||||
OfficialVerify({
|
||||
this.type,
|
||||
this.desc,
|
||||
this.role,
|
||||
this.title,
|
||||
this.icon,
|
||||
this.spliceTitle,
|
||||
});
|
||||
|
||||
factory OfficialVerify.fromJson(Map<String, dynamic> json) {
|
||||
return OfficialVerify(
|
||||
type: json['type'] as int?,
|
||||
desc: json['desc'] as String?,
|
||||
role: json['role'] as int?,
|
||||
title: json['title'] as String?,
|
||||
icon: json['icon'] as String?,
|
||||
spliceTitle: json['splice_title'] as String?,
|
||||
);
|
||||
OfficialVerify.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
|
||||
spliceTitle = json['splice_title'] as String?;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
class PlayGame {
|
||||
int? count;
|
||||
List<dynamic>? item;
|
||||
|
||||
PlayGame({this.count, this.item});
|
||||
|
||||
factory PlayGame.fromJson(Map<String, dynamic> json) => PlayGame(
|
||||
count: json['count'] as int?,
|
||||
item: json['item'] as List<dynamic>?,
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
class PosSpec {
|
||||
int? coordinatePos;
|
||||
double? axisX;
|
||||
double? axisY;
|
||||
|
||||
PosSpec({this.coordinatePos, this.axisX, this.axisY});
|
||||
|
||||
factory PosSpec.fromJson(Map<String, dynamic> json) => PosSpec(
|
||||
coordinatePos: json['coordinate_pos'] as int?,
|
||||
axisX: (json['axis_x'] as num?)?.toDouble(),
|
||||
axisY: (json['axis_y'] as num?)?.toDouble(),
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
class Preference {
|
||||
bool? collectionPublic;
|
||||
String? garbFirstGain;
|
||||
int? orderType;
|
||||
|
||||
Preference({this.collectionPublic, this.garbFirstGain, this.orderType});
|
||||
|
||||
factory Preference.fromJson(Map<String, dynamic> json) => Preference(
|
||||
collectionPublic: json['collection_public'] as bool?,
|
||||
garbFirstGain: json['garb_first_gain'] as String?,
|
||||
orderType: json['order_type'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
class ProfessionVerify {
|
||||
String? icon;
|
||||
String? showDesc;
|
||||
|
||||
ProfessionVerify({this.icon, this.showDesc});
|
||||
|
||||
factory ProfessionVerify.fromJson(Map<String, dynamic> json) {
|
||||
return ProfessionVerify(
|
||||
icon: json['icon'] as String?,
|
||||
showDesc: json['show_desc'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
class PurchaseButton {
|
||||
String? uri;
|
||||
String? title;
|
||||
|
||||
PurchaseButton({this.uri, this.title});
|
||||
|
||||
factory PurchaseButton.fromJson(Map<String, dynamic> json) {
|
||||
return PurchaseButton(
|
||||
uri: json['uri'] as String?,
|
||||
title: json['title'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
class RenderSpec {
|
||||
int? opacity;
|
||||
|
||||
RenderSpec({this.opacity});
|
||||
|
||||
factory RenderSpec.fromJson(Map<String, dynamic> json) => RenderSpec(
|
||||
opacity: json['opacity'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/space/space/draw_src.dart';
|
||||
|
||||
class ResNativeDraw {
|
||||
DrawSrc? drawSrc;
|
||||
|
||||
ResNativeDraw({this.drawSrc});
|
||||
|
||||
factory ResNativeDraw.fromJson(Map<String, dynamic> json) => ResNativeDraw(
|
||||
drawSrc: json['draw_src'] == null
|
||||
? null
|
||||
: DrawSrc.fromJson(json['draw_src'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
51
lib/models_new/space/space/reservation_card_list.dart
Normal file
51
lib/models_new/space/space/reservation_card_list.dart
Normal file
@@ -0,0 +1,51 @@
|
||||
class ReservationCardItem {
|
||||
int? sid;
|
||||
String? name;
|
||||
int total;
|
||||
bool isFollow;
|
||||
int? livePlanStartTime;
|
||||
String? descText1;
|
||||
String? dynamicId;
|
||||
LotteryPrizeInfo? lotteryPrizeInfo;
|
||||
|
||||
ReservationCardItem({
|
||||
this.sid,
|
||||
this.name,
|
||||
required this.total,
|
||||
required this.isFollow,
|
||||
this.livePlanStartTime,
|
||||
this.descText1,
|
||||
this.dynamicId,
|
||||
this.lotteryPrizeInfo,
|
||||
});
|
||||
|
||||
factory ReservationCardItem.fromJson(Map<String, dynamic> json) =>
|
||||
ReservationCardItem(
|
||||
sid: json['sid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
total: json['total'] ?? 0,
|
||||
isFollow: json['is_follow'] == 1,
|
||||
livePlanStartTime: json['live_plan_start_time'] as int?,
|
||||
descText1: json['desc_text_1']?['text'],
|
||||
dynamicId: json['dynamic_id'] as String?,
|
||||
lotteryPrizeInfo: json['lottery_prize_info'] == null
|
||||
? null
|
||||
: LotteryPrizeInfo.fromJson(
|
||||
json['lottery_prize_info'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class LotteryPrizeInfo {
|
||||
String? text;
|
||||
String? jumpUrl;
|
||||
|
||||
LotteryPrizeInfo({this.text, this.jumpUrl});
|
||||
|
||||
factory LotteryPrizeInfo.fromJson(Map<String, dynamic> json) {
|
||||
return LotteryPrizeInfo(
|
||||
text: json['text'] as String?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/space/space/res_native_draw.dart';
|
||||
|
||||
class Resource {
|
||||
int? resType;
|
||||
ResNativeDraw? resNativeDraw;
|
||||
|
||||
Resource({this.resType, this.resNativeDraw});
|
||||
|
||||
factory Resource.fromJson(Map<String, dynamic> json) => Resource(
|
||||
resType: json['res_type'] as int?,
|
||||
resNativeDraw: json['res_native_draw'] == null
|
||||
? null
|
||||
: ResNativeDraw.fromJson(
|
||||
json['res_native_draw'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class SeniorInquiry {
|
||||
String? inquiryText;
|
||||
String? inquiryUrl;
|
||||
|
||||
SeniorInquiry({this.inquiryText, this.inquiryUrl});
|
||||
|
||||
factory SeniorInquiry.fromJson(Map<String, dynamic> json) => SeniorInquiry(
|
||||
inquiryText: json['inquiry_text'] as String?,
|
||||
inquiryUrl: json['inquiry_url'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class SizeSpec {
|
||||
double? width;
|
||||
double? height;
|
||||
|
||||
SizeSpec({this.width, this.height});
|
||||
|
||||
factory SizeSpec.fromJson(Map<String, dynamic> json) => SizeSpec(
|
||||
width: (json['width'] as num?)?.toDouble(),
|
||||
height: (json['height'] as num?)?.toDouble(),
|
||||
);
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
class SpaceButtonList {
|
||||
String? icon;
|
||||
String? title;
|
||||
String? subTitle;
|
||||
String? url;
|
||||
String? moduleType;
|
||||
String? titleDarkColor;
|
||||
String? titleLightColor;
|
||||
String? subTitleDarkColor;
|
||||
String? subTitleLightColor;
|
||||
String? backgroundDarkColor;
|
||||
String? backgroundLightColor;
|
||||
|
||||
SpaceButtonList({
|
||||
this.icon,
|
||||
this.title,
|
||||
this.subTitle,
|
||||
this.url,
|
||||
this.moduleType,
|
||||
this.titleDarkColor,
|
||||
this.titleLightColor,
|
||||
this.subTitleDarkColor,
|
||||
this.subTitleLightColor,
|
||||
this.backgroundDarkColor,
|
||||
this.backgroundLightColor,
|
||||
});
|
||||
|
||||
factory SpaceButtonList.fromJson(Map<String, dynamic> json) {
|
||||
return SpaceButtonList(
|
||||
icon: json['icon'] as String?,
|
||||
title: json['title'] as String?,
|
||||
subTitle: json['sub_title'] as String?,
|
||||
url: json['url'] as String?,
|
||||
moduleType: json['module_type'] as String?,
|
||||
titleDarkColor: json['title_dark_color'] as String?,
|
||||
titleLightColor: json['title_light_color'] as String?,
|
||||
subTitleDarkColor: json['sub_title_dark_color'] as String?,
|
||||
subTitleLightColor: json['sub_title_light_color'] as String?,
|
||||
backgroundDarkColor: json['background_dark_color'] as String?,
|
||||
backgroundLightColor: json['background_light_color'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
class Stats {
|
||||
int? view;
|
||||
int? favorite;
|
||||
int? like;
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
num? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
this.view,
|
||||
this.favorite,
|
||||
this.like,
|
||||
this.dislike,
|
||||
this.reply,
|
||||
this.share,
|
||||
this.coin,
|
||||
this.dynam1c,
|
||||
});
|
||||
|
||||
factory Stats.fromJson(Map<String, dynamic> json) => Stats(
|
||||
view: json['view'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
like: json['like'] as int?,
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,32 +1,11 @@
|
||||
class Badge {
|
||||
String? text;
|
||||
String? textColor;
|
||||
String? textColorNight;
|
||||
String? bgColor;
|
||||
String? bgColorNight;
|
||||
String? borderColor;
|
||||
String? borderColorNight;
|
||||
int? bgStyle;
|
||||
|
||||
Badge({
|
||||
this.text,
|
||||
this.textColor,
|
||||
this.textColorNight,
|
||||
this.bgColor,
|
||||
this.bgColorNight,
|
||||
this.borderColor,
|
||||
this.borderColorNight,
|
||||
this.bgStyle,
|
||||
});
|
||||
|
||||
factory Badge.fromJson(Map<String, dynamic> json) => Badge(
|
||||
text: json['text'] as String?,
|
||||
textColor: json['text_color'] as String?,
|
||||
textColorNight: json['text_color_night'] as String?,
|
||||
bgColor: json['bg_color'] as String?,
|
||||
bgColorNight: json['bg_color_night'] as String?,
|
||||
borderColor: json['border_color'] as String?,
|
||||
borderColorNight: json['border_color_night'] as String?,
|
||||
bgStyle: json['bg_style'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
class CursorAttr {
|
||||
bool? isLastWatchedArc;
|
||||
int? rank;
|
||||
|
||||
CursorAttr({this.isLastWatchedArc, this.rank});
|
||||
|
||||
factory CursorAttr.fromJson(Map<String, dynamic> json) => CursorAttr(
|
||||
isLastWatchedArc: json['is_last_watched_arc'] as bool?,
|
||||
rank: json['rank'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,24 +1,18 @@
|
||||
import 'package:PiliPlus/models_new/space/space_archive/episodic_button.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/item.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/last_watched_locator.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/order.dart';
|
||||
|
||||
class SpaceArchiveData {
|
||||
EpisodicButton? episodicButton;
|
||||
List<Order>? order;
|
||||
int? count;
|
||||
List<SpaceArchiveItem>? item;
|
||||
LastWatchedLocator? lastWatchedLocator;
|
||||
bool? hasNext;
|
||||
bool? hasPrev;
|
||||
int? next;
|
||||
|
||||
SpaceArchiveData({
|
||||
this.episodicButton,
|
||||
this.order,
|
||||
this.count,
|
||||
this.item,
|
||||
this.lastWatchedLocator,
|
||||
this.hasNext,
|
||||
this.hasPrev,
|
||||
this.next,
|
||||
@@ -31,18 +25,10 @@ class SpaceArchiveData {
|
||||
: EpisodicButton.fromJson(
|
||||
json['episodic_button'] as Map<String, dynamic>,
|
||||
),
|
||||
order: (json['order'] as List<dynamic>?)
|
||||
?.map((e) => Order.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
count: json['count'] as int?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => SpaceArchiveItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
lastWatchedLocator: json['last_watched_locator'] == null
|
||||
? null
|
||||
: LastWatchedLocator.fromJson(
|
||||
json['last_watched_locator'] as Map<String, dynamic>,
|
||||
),
|
||||
hasNext: json['has_next'] as bool?,
|
||||
hasPrev: json['has_prev'] as bool?,
|
||||
next: json['next'],
|
||||
|
||||
@@ -1,33 +1,18 @@
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models/model_video.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/badge.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/cursor_attr.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/history.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_archive/season.dart';
|
||||
|
||||
class SpaceArchiveItem extends BaseSimpleVideoItemModel {
|
||||
String? subtitle;
|
||||
String? tname;
|
||||
String? coverIcon;
|
||||
String? uri;
|
||||
String? param;
|
||||
String? goto;
|
||||
String? length;
|
||||
bool? isPopular;
|
||||
bool? isSteins;
|
||||
bool? isUgcpay;
|
||||
bool? isCooperation;
|
||||
bool? isPgc;
|
||||
bool? isLivePlayback;
|
||||
bool? isPugv;
|
||||
bool? isFold;
|
||||
bool? isOneself;
|
||||
int? ctime;
|
||||
int? ugcPay;
|
||||
bool? state;
|
||||
int? videos;
|
||||
CursorAttr? cursorAttr;
|
||||
int? iconType;
|
||||
String? publishTimeText;
|
||||
List<Badge>? badges;
|
||||
SpaceArchiveSeason? season;
|
||||
@@ -37,34 +22,18 @@ class SpaceArchiveItem extends BaseSimpleVideoItemModel {
|
||||
|
||||
SpaceArchiveItem.fromJson(Map<String, dynamic> json) {
|
||||
title = json['title'];
|
||||
subtitle = json['subtitle'];
|
||||
tname = json['tname'];
|
||||
cover = json['cover'];
|
||||
coverIcon = json['cover_icon'];
|
||||
uri = json['uri'];
|
||||
param = json['param'];
|
||||
goto = json['goto'];
|
||||
length = json['length'];
|
||||
duration = json['duration'] ?? -1;
|
||||
isPopular = json['is_popular'];
|
||||
isSteins = json['is_steins'];
|
||||
isUgcpay = json['is_ugcpay'];
|
||||
isCooperation = json['is_cooperation'];
|
||||
isPgc = json['is_pgc'];
|
||||
isLivePlayback = json['is_live_playback'];
|
||||
isPugv = json['is_pugv'];
|
||||
isFold = json['is_fold'];
|
||||
isOneself = json['is_oneself'];
|
||||
ctime = json['ctime'];
|
||||
ugcPay = json['ugc_pay'];
|
||||
state = json['state'];
|
||||
bvid = json['bvid'];
|
||||
videos = json['videos'];
|
||||
cid = json['first_cid'];
|
||||
cursorAttr = json['cursor_attr'] == null
|
||||
? null
|
||||
: CursorAttr.fromJson(json['cursor_attr'] as Map<String, dynamic>);
|
||||
iconType = json['icon_type'];
|
||||
publishTimeText = json['publish_time_text'];
|
||||
badges = (json['badges'] as List<dynamic>?)
|
||||
?.map((e) => Badge.fromJson(e as Map<String, dynamic>))
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
class LastWatchedLocator {
|
||||
int? displayThreshold;
|
||||
int? insertRanking;
|
||||
String? text;
|
||||
|
||||
LastWatchedLocator({
|
||||
this.displayThreshold,
|
||||
this.insertRanking,
|
||||
this.text,
|
||||
});
|
||||
|
||||
factory LastWatchedLocator.fromJson(Map<String, dynamic> json) {
|
||||
return LastWatchedLocator(
|
||||
displayThreshold: json['display_threshold'] as int?,
|
||||
insertRanking: json['insert_ranking'] as int?,
|
||||
text: json['text'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
class Order {
|
||||
String? title;
|
||||
String? value;
|
||||
|
||||
Order({this.title, this.value});
|
||||
|
||||
factory Order.fromJson(Map<String, dynamic> json) => Order(
|
||||
title: json['title'] as String?,
|
||||
value: json['value'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
class SpaceArchiveStat {
|
||||
String? viewStr;
|
||||
String? danmuStr;
|
||||
|
||||
SpaceArchiveStat({
|
||||
this.viewStr,
|
||||
this.danmuStr,
|
||||
});
|
||||
|
||||
factory SpaceArchiveStat.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceArchiveStat(
|
||||
viewStr: json['view_str'],
|
||||
danmuStr: json['danmu_str'],
|
||||
);
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class Author {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
Pendant? pendant;
|
||||
BaseOfficialVerify? officialVerify;
|
||||
Vip? vip;
|
||||
|
||||
Author({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.face,
|
||||
this.pendant,
|
||||
this.officialVerify,
|
||||
this.vip,
|
||||
});
|
||||
|
||||
factory Author.fromJson(Map<String, dynamic> json) => Author(
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
pendant: json['pendant'] == null
|
||||
? null
|
||||
: Pendant.fromJson(json['pendant'] as Map<String, dynamic>),
|
||||
officialVerify: json['official_verify'] == null
|
||||
? null
|
||||
: BaseOfficialVerify.fromJson(
|
||||
json['official_verify'] as Map<String, dynamic>,
|
||||
),
|
||||
vip: json['vip'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
class Category {
|
||||
int? id;
|
||||
int? parentId;
|
||||
String? name;
|
||||
|
||||
Category({this.id, this.parentId, this.name});
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json) => Category(
|
||||
id: json['id'] as int?,
|
||||
parentId: json['parent_id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
import 'package:PiliPlus/models_new/space/space_article/item.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_article/list.dart';
|
||||
|
||||
class SpaceArticleData {
|
||||
int? count;
|
||||
List<SpaceArticleItem>? item;
|
||||
int? listsCount;
|
||||
List<SpaceArticleList>? lists;
|
||||
|
||||
SpaceArticleData({this.count, this.item, this.listsCount, this.lists});
|
||||
SpaceArticleData({this.count, this.item, this.listsCount});
|
||||
|
||||
factory SpaceArticleData.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceArticleData(
|
||||
@@ -16,8 +14,5 @@ class SpaceArticleData {
|
||||
?.map((e) => SpaceArticleItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
listsCount: json['lists_count'] as int?,
|
||||
lists: (json['lists'] as List<dynamic>?)
|
||||
?.map((e) => SpaceArticleList.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,136 +1,29 @@
|
||||
import 'package:PiliPlus/models_new/space/space_article/author.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_article/category.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_article/media.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_article/stats.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
|
||||
class SpaceArticleItem {
|
||||
int? id;
|
||||
Category? category;
|
||||
List<Category>? categories;
|
||||
String? title;
|
||||
String? summary;
|
||||
String? bannerUrl;
|
||||
int? templateId;
|
||||
int? state;
|
||||
Author? author;
|
||||
int? reprint;
|
||||
List<String>? imageUrls;
|
||||
int? publishTime;
|
||||
int? ctime;
|
||||
int? mtime;
|
||||
Stats? stats;
|
||||
int? attributes;
|
||||
int? words;
|
||||
List<String>? originImageUrls;
|
||||
dynamic list;
|
||||
bool? isLike;
|
||||
Media? media;
|
||||
String? applyTime;
|
||||
String? checkTime;
|
||||
int? original;
|
||||
int? actId;
|
||||
dynamic dispute;
|
||||
dynamic authenMark;
|
||||
int? coverAvid;
|
||||
dynamic topVideoInfo;
|
||||
int? type;
|
||||
int? checkState;
|
||||
int? originTemplateId;
|
||||
String? uri;
|
||||
String? param;
|
||||
String? goto;
|
||||
String? publishTimeText;
|
||||
String? dynam1c;
|
||||
|
||||
SpaceArticleItem({
|
||||
this.id,
|
||||
this.category,
|
||||
this.categories,
|
||||
this.title,
|
||||
this.summary,
|
||||
this.bannerUrl,
|
||||
this.templateId,
|
||||
this.state,
|
||||
this.author,
|
||||
this.reprint,
|
||||
this.imageUrls,
|
||||
this.publishTime,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.stats,
|
||||
this.attributes,
|
||||
this.words,
|
||||
this.originImageUrls,
|
||||
this.list,
|
||||
this.isLike,
|
||||
this.media,
|
||||
this.applyTime,
|
||||
this.checkTime,
|
||||
this.original,
|
||||
this.actId,
|
||||
this.dispute,
|
||||
this.authenMark,
|
||||
this.coverAvid,
|
||||
this.topVideoInfo,
|
||||
this.type,
|
||||
this.checkState,
|
||||
this.originTemplateId,
|
||||
this.uri,
|
||||
this.param,
|
||||
this.goto,
|
||||
this.publishTimeText,
|
||||
this.dynam1c,
|
||||
});
|
||||
|
||||
factory SpaceArticleItem.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceArticleItem(
|
||||
id: json['id'] as int?,
|
||||
category: json['category'] == null
|
||||
? null
|
||||
: Category.fromJson(json['category'] as Map<String, dynamic>),
|
||||
categories: (json['categories'] as List<dynamic>?)
|
||||
?.map((e) => Category.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
title: json['title'] as String?,
|
||||
summary: json['summary'] as String?,
|
||||
bannerUrl: json['banner_url'] as String?,
|
||||
templateId: json['template_id'] as int?,
|
||||
state: json['state'] as int?,
|
||||
author: json['author'] == null
|
||||
? null
|
||||
: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
reprint: json['reprint'] as int?,
|
||||
imageUrls: (json['image_urls'] as List?)?.fromCast(),
|
||||
publishTime: json['publish_time'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
stats: json['stats'] == null
|
||||
? null
|
||||
: Stats.fromJson(json['stats'] as Map<String, dynamic>),
|
||||
attributes: json['attributes'] as int?,
|
||||
words: json['words'] as int?,
|
||||
originImageUrls: (json['origin_image_urls'] as List?)?.fromCast(),
|
||||
list: json['list'] as dynamic,
|
||||
isLike: json['is_like'] as bool?,
|
||||
media: json['media'] == null
|
||||
? null
|
||||
: Media.fromJson(json['media'] as Map<String, dynamic>),
|
||||
applyTime: json['apply_time'] as String?,
|
||||
checkTime: json['check_time'] as String?,
|
||||
original: json['original'] as int?,
|
||||
actId: json['act_id'] as int?,
|
||||
dispute: json['dispute'] as dynamic,
|
||||
authenMark: json['authenMark'] as dynamic,
|
||||
coverAvid: json['cover_avid'] as int?,
|
||||
topVideoInfo: json['top_video_info'] as dynamic,
|
||||
type: json['type'] as int?,
|
||||
checkState: json['check_state'] as int?,
|
||||
originTemplateId: json['origin_template_id'] as int?,
|
||||
uri: json['uri'] as String?,
|
||||
param: json['param'] as String?,
|
||||
goto: json['goto'] as String?,
|
||||
publishTimeText: json['publish_time_text'] as String?,
|
||||
dynam1c: json['dynamic'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
class SpaceArticleList {
|
||||
int? id;
|
||||
int? mid;
|
||||
String? name;
|
||||
String? imageUrl;
|
||||
int? updateTime;
|
||||
int? ctime;
|
||||
int? publishTime;
|
||||
String? summary;
|
||||
int? words;
|
||||
int? read;
|
||||
int? articlesCount;
|
||||
String? updateTimeText;
|
||||
|
||||
SpaceArticleList({
|
||||
this.id,
|
||||
this.mid,
|
||||
this.name,
|
||||
this.imageUrl,
|
||||
this.updateTime,
|
||||
this.ctime,
|
||||
this.publishTime,
|
||||
this.summary,
|
||||
this.words,
|
||||
this.read,
|
||||
this.articlesCount,
|
||||
this.updateTimeText,
|
||||
});
|
||||
|
||||
factory SpaceArticleList.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceArticleList(
|
||||
id: json['id'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
imageUrl: json['image_url'] as String?,
|
||||
updateTime: json['update_time'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
publishTime: json['publish_time'] as int?,
|
||||
summary: json['summary'] as String?,
|
||||
words: json['words'] as int?,
|
||||
read: json['read'] as int?,
|
||||
articlesCount: json['articles_count'] as int?,
|
||||
updateTimeText: json['update_time_text'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
class Media {
|
||||
int? score;
|
||||
int? mediaId;
|
||||
String? title;
|
||||
String? cover;
|
||||
String? area;
|
||||
int? typeId;
|
||||
String? typeName;
|
||||
int? spoiler;
|
||||
|
||||
Media({
|
||||
this.score,
|
||||
this.mediaId,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.area,
|
||||
this.typeId,
|
||||
this.typeName,
|
||||
this.spoiler,
|
||||
});
|
||||
|
||||
factory Media.fromJson(Map<String, dynamic> json) => Media(
|
||||
score: json['score'] as int?,
|
||||
mediaId: json['media_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
area: json['area'] as String?,
|
||||
typeId: json['type_id'] as int?,
|
||||
typeName: json['type_name'] as String?,
|
||||
spoiler: json['spoiler'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,32 +1,14 @@
|
||||
class Stats {
|
||||
int? view;
|
||||
int? favorite;
|
||||
int? like;
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
num? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
this.view,
|
||||
this.favorite,
|
||||
this.like,
|
||||
this.dislike,
|
||||
this.reply,
|
||||
this.share,
|
||||
this.coin,
|
||||
this.dynam1c,
|
||||
});
|
||||
|
||||
factory Stats.fromJson(Map<String, dynamic> json) => Stats(
|
||||
view: json['view'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
like: json['like'] as int?,
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,25 +1,16 @@
|
||||
import 'package:PiliPlus/models_new/space/space_audio/item.dart';
|
||||
|
||||
class SpaceAudioData {
|
||||
int? curPage;
|
||||
int? pageCount;
|
||||
int? totalSize;
|
||||
int? pageSize;
|
||||
List<SpaceAudioItem>? items;
|
||||
|
||||
SpaceAudioData({
|
||||
this.curPage,
|
||||
this.pageCount,
|
||||
this.totalSize,
|
||||
this.pageSize,
|
||||
this.items,
|
||||
});
|
||||
|
||||
factory SpaceAudioData.fromJson(Map<String, dynamic> json) => SpaceAudioData(
|
||||
curPage: json['curPage'] as int?,
|
||||
pageCount: json['pageCount'] as int?,
|
||||
totalSize: json['totalSize'] as int?,
|
||||
pageSize: json['pageSize'] as int?,
|
||||
items: (json['data'] as List<dynamic>?)
|
||||
?.map((e) => SpaceAudioItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
|
||||
@@ -3,88 +3,37 @@ import 'package:PiliPlus/models_new/space/space_audio/statistic.dart';
|
||||
class SpaceAudioItem {
|
||||
int? id;
|
||||
int? uid;
|
||||
String? uname;
|
||||
String? author;
|
||||
String? title;
|
||||
String? cover;
|
||||
String? intro;
|
||||
String? lyric;
|
||||
int? crtype;
|
||||
int? duration;
|
||||
int? passtime;
|
||||
int? curtime;
|
||||
int? aid;
|
||||
String? bvid;
|
||||
int? cid;
|
||||
int? msid;
|
||||
int? attr;
|
||||
int? limit;
|
||||
int? activityId;
|
||||
String? limitdesc;
|
||||
num? coinNum;
|
||||
int? ctime;
|
||||
Statistic? statistic;
|
||||
dynamic vipInfo;
|
||||
dynamic collectIds;
|
||||
int? isCooper;
|
||||
|
||||
SpaceAudioItem({
|
||||
this.id,
|
||||
this.uid,
|
||||
this.uname,
|
||||
this.author,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.intro,
|
||||
this.lyric,
|
||||
this.crtype,
|
||||
this.duration,
|
||||
this.passtime,
|
||||
this.curtime,
|
||||
this.aid,
|
||||
this.bvid,
|
||||
this.cid,
|
||||
this.msid,
|
||||
this.attr,
|
||||
this.limit,
|
||||
this.activityId,
|
||||
this.limitdesc,
|
||||
this.coinNum,
|
||||
this.ctime,
|
||||
this.statistic,
|
||||
this.vipInfo,
|
||||
this.collectIds,
|
||||
this.isCooper,
|
||||
});
|
||||
|
||||
factory SpaceAudioItem.fromJson(Map<String, dynamic> json) => SpaceAudioItem(
|
||||
id: json['id'] as int?,
|
||||
uid: json['uid'] as int?,
|
||||
uname: json['uname'] as String?,
|
||||
author: json['author'] as String?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
intro: json['intro'] as String?,
|
||||
lyric: json['lyric'] as String?,
|
||||
crtype: json['crtype'] as int?,
|
||||
duration: json['duration'] as int?,
|
||||
passtime: json['passtime'] as int?,
|
||||
curtime: json['curtime'] as int?,
|
||||
aid: json['aid'] as int?,
|
||||
bvid: json['bvid'] as String?,
|
||||
cid: json['cid'] as int?,
|
||||
msid: json['msid'] as int?,
|
||||
attr: json['attr'] as int?,
|
||||
limit: json['limit'] as int?,
|
||||
activityId: json['activityId'] as int?,
|
||||
limitdesc: json['limitdesc'] as String?,
|
||||
coinNum: json['coin_num'] as num?,
|
||||
ctime: json['ctime'] as int?,
|
||||
statistic: json['statistic'] == null
|
||||
? null
|
||||
: Statistic.fromJson(json['statistic'] as Map<String, dynamic>),
|
||||
vipInfo: json['vipInfo'] as dynamic,
|
||||
collectIds: json['collectIds'] as dynamic,
|
||||
isCooper: json['is_cooper'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
class Statistic {
|
||||
int? sid;
|
||||
int? play;
|
||||
int? collect;
|
||||
int? comment;
|
||||
int? share;
|
||||
|
||||
Statistic({this.sid, this.play, this.collect, this.comment, this.share});
|
||||
Statistic({this.play, this.comment});
|
||||
|
||||
factory Statistic.fromJson(Map<String, dynamic> json) => Statistic(
|
||||
sid: json['sid'] as int?,
|
||||
play: json['play'] as int?,
|
||||
collect: json['collect'] as int?,
|
||||
comment: json['comment'] as int?,
|
||||
share: json['share'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,49 +1,28 @@
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
|
||||
class SpaceCheeseItem {
|
||||
bool? cooperated;
|
||||
String? cooperationMark;
|
||||
String? cover;
|
||||
int? epCount;
|
||||
String? link;
|
||||
List<String>? marks;
|
||||
int? page;
|
||||
int? play;
|
||||
int? seasonId;
|
||||
String? status;
|
||||
String? subtitle;
|
||||
String? title;
|
||||
String? ctime;
|
||||
|
||||
SpaceCheeseItem({
|
||||
this.cooperated,
|
||||
this.cooperationMark,
|
||||
this.cover,
|
||||
this.epCount,
|
||||
this.link,
|
||||
this.marks,
|
||||
this.page,
|
||||
this.play,
|
||||
this.seasonId,
|
||||
this.status,
|
||||
this.subtitle,
|
||||
this.title,
|
||||
this.ctime,
|
||||
});
|
||||
|
||||
factory SpaceCheeseItem.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceCheeseItem(
|
||||
cooperated: json['cooperated'] as bool?,
|
||||
cooperationMark: json['cooperation_mark'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
epCount: json['ep_count'] as int?,
|
||||
link: json['link'] as String?,
|
||||
marks: (json['marks'] as List?)?.fromCast(),
|
||||
page: json['page'] as int?,
|
||||
play: json['play'] as int?,
|
||||
seasonId: json['season_id'] as int?,
|
||||
status: json['status'] as String?,
|
||||
subtitle: json['subtitle'] as String?,
|
||||
title: json['title'] as String?,
|
||||
ctime: json['ctime'] as String?,
|
||||
);
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
class SpaceCheesePage {
|
||||
bool? next;
|
||||
int? num;
|
||||
int? size;
|
||||
int? total;
|
||||
|
||||
SpaceCheesePage({this.next, this.num, this.size, this.total});
|
||||
SpaceCheesePage({this.next});
|
||||
|
||||
factory SpaceCheesePage.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceCheesePage(
|
||||
next: json['next'] as bool?,
|
||||
num: json['num'] as int?,
|
||||
size: json['size'] as int?,
|
||||
total: json['total'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,9 +4,8 @@ class SpaceFavData {
|
||||
int? id;
|
||||
String? name;
|
||||
MediaListResponse? mediaListResponse;
|
||||
String? uri;
|
||||
|
||||
SpaceFavData({this.id, this.name, this.mediaListResponse, this.uri});
|
||||
SpaceFavData({this.id, this.name, this.mediaListResponse});
|
||||
|
||||
factory SpaceFavData.fromJson(Map<String, dynamic> json) => SpaceFavData(
|
||||
id: json['id'] as int?,
|
||||
@@ -16,6 +15,5 @@ class SpaceFavData {
|
||||
: MediaListResponse.fromJson(
|
||||
json['mediaListResponse'] as Map<String, dynamic>,
|
||||
),
|
||||
uri: json['uri'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ class SpaceFavItemModel extends SubItemModel {
|
||||
super.fid,
|
||||
super.mid,
|
||||
super.attr,
|
||||
super.attrDesc,
|
||||
super.title,
|
||||
super.cover,
|
||||
super.upper,
|
||||
@@ -26,13 +25,7 @@ class SpaceFavItemModel extends SubItemModel {
|
||||
super.favState,
|
||||
super.mediaCount,
|
||||
super.viewCount,
|
||||
super.vt,
|
||||
super.isTop,
|
||||
super.recentFav,
|
||||
super.playSwitch,
|
||||
super.type,
|
||||
super.link,
|
||||
super.bvid,
|
||||
});
|
||||
|
||||
factory SpaceFavItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -44,7 +37,6 @@ class SpaceFavItemModel extends SubItemModel {
|
||||
fid: json['fid'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
attr: json['attr'] as int?,
|
||||
attrDesc: json['attr_desc'] as String?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
upper: json['upper'] == null
|
||||
@@ -58,12 +50,6 @@ class SpaceFavItemModel extends SubItemModel {
|
||||
favState: json['fav_state'] as int?,
|
||||
mediaCount: json['media_count'] as int?,
|
||||
viewCount: json['view_count'] as int?,
|
||||
vt: json['vt'] as int?,
|
||||
isTop: json['is_top'] as bool?,
|
||||
recentFav: json['recent_fav'] as dynamic,
|
||||
playSwitch: json['play_switch'] as int?,
|
||||
type: json['type'] as int?,
|
||||
link: json['link'] as String?,
|
||||
bvid: json['bvid'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,9 +3,8 @@ import 'package:PiliPlus/models_new/space/space_fav/list.dart';
|
||||
class MediaListResponse {
|
||||
int? count;
|
||||
List<SpaceFavItemModel>? list;
|
||||
bool? hasMore;
|
||||
|
||||
MediaListResponse({this.count, this.list, this.hasMore});
|
||||
MediaListResponse({this.count, this.list});
|
||||
|
||||
factory MediaListResponse.fromJson(Map<String, dynamic> json) {
|
||||
return MediaListResponse(
|
||||
@@ -13,7 +12,6 @@ class MediaListResponse {
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => SpaceFavItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
hasMore: json['has_more'] as bool?,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
class Cover {
|
||||
int? height;
|
||||
String? url;
|
||||
int? width;
|
||||
late double ratio;
|
||||
|
||||
Cover({this.height, this.url, this.width, required this.ratio});
|
||||
Cover({required this.ratio});
|
||||
|
||||
Cover.fromJson(Map<String, dynamic> json) {
|
||||
height = json['height'] as int?;
|
||||
url = json['url'] as String?;
|
||||
width = json['width'] as int?;
|
||||
final height = json['height'] as int?;
|
||||
final width = json['width'] as int?;
|
||||
if (height != null && width != null) {
|
||||
ratio = clampDouble(height! / width!, 0.68, 2.7);
|
||||
ratio = clampDouble(height / width, 0.68, 2.7);
|
||||
} else {
|
||||
ratio = 1;
|
||||
}
|
||||
|
||||
@@ -4,9 +4,8 @@ class SpaceOpusData {
|
||||
bool? hasMore;
|
||||
List<SpaceOpusItemModel>? items;
|
||||
String? offset;
|
||||
int? updateNum;
|
||||
|
||||
SpaceOpusData({this.hasMore, this.items, this.offset, this.updateNum});
|
||||
SpaceOpusData({this.hasMore, this.items, this.offset});
|
||||
|
||||
factory SpaceOpusData.fromJson(Map<String, dynamic> json) => SpaceOpusData(
|
||||
hasMore: json['has_more'] as bool?,
|
||||
@@ -14,6 +13,5 @@ class SpaceOpusData {
|
||||
?.map((e) => SpaceOpusItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
offset: json['offset'] as String?,
|
||||
updateNum: json['update_num'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,14 +3,12 @@ import 'package:PiliPlus/models_new/space/space_opus/stat.dart';
|
||||
|
||||
class SpaceOpusItemModel {
|
||||
String? content;
|
||||
String? jumpUrl;
|
||||
String? opusId;
|
||||
Stat? stat;
|
||||
Cover? cover;
|
||||
|
||||
SpaceOpusItemModel({
|
||||
this.content,
|
||||
this.jumpUrl,
|
||||
this.opusId,
|
||||
this.stat,
|
||||
this.cover,
|
||||
@@ -19,7 +17,6 @@ class SpaceOpusItemModel {
|
||||
factory SpaceOpusItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceOpusItemModel(
|
||||
content: json['content'] as String?,
|
||||
jumpUrl: json['jump_url'] as String?,
|
||||
opusId: json['opus_id'] as String?,
|
||||
stat: json['stat'] == null
|
||||
? null
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
import 'package:PiliPlus/models_new/space/space_season_series/stat.dart';
|
||||
|
||||
class SpaceSsArchive {
|
||||
int? aid;
|
||||
String? bvid;
|
||||
int? ctime;
|
||||
int? duration;
|
||||
bool? enableVt;
|
||||
bool? interactiveVideo;
|
||||
String? pic;
|
||||
int? playbackPosition;
|
||||
int? pubdate;
|
||||
SpaceSsStat? stat;
|
||||
int? state;
|
||||
String? title;
|
||||
int? ugcPay;
|
||||
String? vtDisplay;
|
||||
int? isLessonVideo;
|
||||
|
||||
SpaceSsArchive({
|
||||
this.aid,
|
||||
this.bvid,
|
||||
this.ctime,
|
||||
this.duration,
|
||||
this.enableVt,
|
||||
this.interactiveVideo,
|
||||
this.pic,
|
||||
this.playbackPosition,
|
||||
this.pubdate,
|
||||
this.stat,
|
||||
this.state,
|
||||
this.title,
|
||||
this.ugcPay,
|
||||
this.vtDisplay,
|
||||
this.isLessonVideo,
|
||||
});
|
||||
|
||||
factory SpaceSsArchive.fromJson(Map<String, dynamic> json) => SpaceSsArchive(
|
||||
aid: json["aid"],
|
||||
bvid: json["bvid"],
|
||||
ctime: json["ctime"],
|
||||
duration: json["duration"],
|
||||
enableVt: json["enable_vt"],
|
||||
interactiveVideo: json["interactive_video"],
|
||||
pic: json["pic"],
|
||||
playbackPosition: json["playback_position"],
|
||||
pubdate: json["pubdate"],
|
||||
stat: json["stat"] == null ? null : SpaceSsStat.fromJson(json["stat"]),
|
||||
state: json["state"],
|
||||
title: json["title"],
|
||||
ugcPay: json["ugc_pay"],
|
||||
vtDisplay: json["vt_display"],
|
||||
isLessonVideo: json["is_lesson_video"],
|
||||
);
|
||||
}
|
||||
@@ -1,23 +1,5 @@
|
||||
class SpaceSsStat {
|
||||
int? view;
|
||||
int? vt;
|
||||
|
||||
SpaceSsStat({
|
||||
this.view,
|
||||
this.vt,
|
||||
});
|
||||
|
||||
factory SpaceSsStat.fromJson(Map<String, dynamic> json) => SpaceSsStat(
|
||||
view: json["view"],
|
||||
vt: json["vt"],
|
||||
);
|
||||
}
|
||||
|
||||
class SpaceSsMeta {
|
||||
int? category;
|
||||
String? cover;
|
||||
String? description;
|
||||
int? mid;
|
||||
String? name;
|
||||
int? ptime;
|
||||
int? total;
|
||||
@@ -25,10 +7,7 @@ class SpaceSsMeta {
|
||||
dynamic seriesId;
|
||||
|
||||
SpaceSsMeta({
|
||||
this.category,
|
||||
this.cover,
|
||||
this.description,
|
||||
this.mid,
|
||||
this.name,
|
||||
this.ptime,
|
||||
this.total,
|
||||
@@ -37,10 +16,7 @@ class SpaceSsMeta {
|
||||
});
|
||||
|
||||
factory SpaceSsMeta.fromJson(Map<String, dynamic> json) => SpaceSsMeta(
|
||||
category: json["category"],
|
||||
cover: json["cover"],
|
||||
description: json["description"],
|
||||
mid: json["mid"],
|
||||
name: json["name"],
|
||||
ptime: json["ptime"],
|
||||
total: json["total"],
|
||||
@@ -1,17 +1,11 @@
|
||||
class SpaceSsPage {
|
||||
int? pageNum;
|
||||
int? pageSize;
|
||||
int? total;
|
||||
|
||||
SpaceSsPage({
|
||||
this.pageNum,
|
||||
this.pageSize,
|
||||
this.total,
|
||||
});
|
||||
|
||||
factory SpaceSsPage.fromJson(Map<String, dynamic> json) => SpaceSsPage(
|
||||
pageNum: json["page_num"],
|
||||
pageSize: json["page_size"],
|
||||
total: json["total"],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,23 +1,11 @@
|
||||
import 'package:PiliPlus/models_new/space/space_season_series/archive.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_season_series/stat.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_season_series/meta.dart';
|
||||
|
||||
class SpaceSsModel {
|
||||
List<SpaceSsArchive>? archives;
|
||||
SpaceSsMeta? meta;
|
||||
List<int>? recentAids;
|
||||
|
||||
SpaceSsModel({
|
||||
this.archives,
|
||||
this.meta,
|
||||
this.recentAids,
|
||||
});
|
||||
SpaceSsModel({this.meta});
|
||||
|
||||
factory SpaceSsModel.fromJson(Map<String, dynamic> json) => SpaceSsModel(
|
||||
archives: (json["archives"] as List?)
|
||||
?.map((e) => SpaceSsArchive.fromJson(e))
|
||||
.toList(),
|
||||
meta: json["meta"] == null ? null : SpaceSsMeta.fromJson(json["meta"]),
|
||||
recentAids: (json["recent_aids"] as List?)?.fromCast(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,44 +1,11 @@
|
||||
class BelowLabel {
|
||||
int? tagType;
|
||||
String? title;
|
||||
String? titleDayColor1;
|
||||
String? titleDayColor2;
|
||||
String? titleNightColor1;
|
||||
String? titleNightColor2;
|
||||
int? cornerRadius;
|
||||
int? useBoard;
|
||||
String? backDayColor1;
|
||||
String? backDayColor2;
|
||||
String? backNightColor1;
|
||||
String? backNightColor2;
|
||||
|
||||
BelowLabel({
|
||||
this.tagType,
|
||||
this.title,
|
||||
this.titleDayColor1,
|
||||
this.titleDayColor2,
|
||||
this.titleNightColor1,
|
||||
this.titleNightColor2,
|
||||
this.cornerRadius,
|
||||
this.useBoard,
|
||||
this.backDayColor1,
|
||||
this.backDayColor2,
|
||||
this.backNightColor1,
|
||||
this.backNightColor2,
|
||||
});
|
||||
|
||||
factory BelowLabel.fromJson(Map<String, dynamic> json) => BelowLabel(
|
||||
tagType: json['tagType'] as int?,
|
||||
title: json['title'] as String?,
|
||||
titleDayColor1: json['titleDayColor1'] as String?,
|
||||
titleDayColor2: json['titleDayColor2'] as String?,
|
||||
titleNightColor1: json['titleNightColor1'] as String?,
|
||||
titleNightColor2: json['titleNightColor2'] as String?,
|
||||
cornerRadius: json['cornerRadius'] as int?,
|
||||
useBoard: json['useBoard'] as int?,
|
||||
backDayColor1: json['backDayColor1'] as String?,
|
||||
backDayColor2: json['backDayColor2'] as String?,
|
||||
backNightColor1: json['backNightColor1'] as String?,
|
||||
backNightColor2: json['backNightColor2'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
class Cover {
|
||||
String? url;
|
||||
String? imgWh;
|
||||
int? height;
|
||||
int? width;
|
||||
dynamic size;
|
||||
|
||||
Cover({this.url, this.imgWh, this.height, this.width, this.size});
|
||||
Cover({this.url});
|
||||
|
||||
factory Cover.fromJson(Map<String, dynamic> json) => Cover(
|
||||
url: json['url'] as String?,
|
||||
imgWh: json['imgWH'] as String?,
|
||||
height: json['height'] as int?,
|
||||
width: json['width'] as int?,
|
||||
size: json['size'] as dynamic,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ class SpaceShopData {
|
||||
String? clickUrl;
|
||||
String? showMoreDesc;
|
||||
bool? haveNextPage;
|
||||
int? nextSearchAfter;
|
||||
|
||||
SpaceShopData({
|
||||
this.data,
|
||||
@@ -14,7 +13,6 @@ class SpaceShopData {
|
||||
this.clickUrl,
|
||||
this.showMoreDesc,
|
||||
this.haveNextPage,
|
||||
this.nextSearchAfter,
|
||||
});
|
||||
|
||||
factory SpaceShopData.fromJson(Map<String, dynamic> json) => SpaceShopData(
|
||||
@@ -25,6 +23,5 @@ class SpaceShopData {
|
||||
clickUrl: json['clickUrl'] as String?,
|
||||
showMoreDesc: json['showMoreDesc'] as String?,
|
||||
haveNextPage: json['haveNextPage'] as bool?,
|
||||
nextSearchAfter: json['nextSearchAfter'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,143 +2,41 @@ import 'package:PiliPlus/models_new/space/space_shop/below_label.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_shop/benefit_info.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_shop/cover.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_shop/net_price.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_shop/report_params.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_shop/source_desc.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_shop/source_front_tag.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
|
||||
class SpaceShopItem {
|
||||
String? contentId;
|
||||
int? contentType;
|
||||
dynamic contentSubType;
|
||||
dynamic trackId;
|
||||
Cover? cover;
|
||||
String? title;
|
||||
dynamic subTitle;
|
||||
String? cardUrl;
|
||||
List<BelowLabel>? belowLabels;
|
||||
dynamic topRightLabels;
|
||||
dynamic bottomRightLabels;
|
||||
dynamic topLeftLabels;
|
||||
dynamic bottomLeftLabels;
|
||||
List<dynamic>? titleFrontLabels;
|
||||
dynamic priceBehindLabels;
|
||||
NetPrice? netPrice;
|
||||
dynamic userInteractInfos;
|
||||
List<BenefitInfo>? benefitInfos;
|
||||
ReportParams? reportParams;
|
||||
dynamic ichibanItem;
|
||||
bool? isMarketItem;
|
||||
dynamic remainBoxStr;
|
||||
dynamic surpriseTips;
|
||||
String? outSchemaUrl;
|
||||
int? itemCode;
|
||||
dynamic merchantId;
|
||||
int? itemSource;
|
||||
String? itemSourceName;
|
||||
SourceDesc? sourceDesc;
|
||||
SourceFrontTag? sourceFrontTag;
|
||||
List<String>? openWhiteList;
|
||||
bool? sellOut;
|
||||
int? status;
|
||||
bool? preSaleEnd;
|
||||
bool? preSaleNotStart;
|
||||
int? jumpType;
|
||||
dynamic lrpriceStr;
|
||||
|
||||
SpaceShopItem({
|
||||
this.contentId,
|
||||
this.contentType,
|
||||
this.contentSubType,
|
||||
this.trackId,
|
||||
this.cover,
|
||||
this.title,
|
||||
this.subTitle,
|
||||
this.cardUrl,
|
||||
this.belowLabels,
|
||||
this.topRightLabels,
|
||||
this.bottomRightLabels,
|
||||
this.topLeftLabels,
|
||||
this.bottomLeftLabels,
|
||||
this.titleFrontLabels,
|
||||
this.priceBehindLabels,
|
||||
this.netPrice,
|
||||
this.userInteractInfos,
|
||||
this.benefitInfos,
|
||||
this.reportParams,
|
||||
this.ichibanItem,
|
||||
this.isMarketItem,
|
||||
this.remainBoxStr,
|
||||
this.surpriseTips,
|
||||
this.outSchemaUrl,
|
||||
this.itemCode,
|
||||
this.merchantId,
|
||||
this.itemSource,
|
||||
this.itemSourceName,
|
||||
this.sourceDesc,
|
||||
this.sourceFrontTag,
|
||||
this.openWhiteList,
|
||||
this.sellOut,
|
||||
this.status,
|
||||
this.preSaleEnd,
|
||||
this.preSaleNotStart,
|
||||
this.jumpType,
|
||||
this.lrpriceStr,
|
||||
});
|
||||
|
||||
factory SpaceShopItem.fromJson(Map<String, dynamic> json) => SpaceShopItem(
|
||||
contentId: json['contentId'] as String?,
|
||||
contentType: json['contentType'] as int?,
|
||||
contentSubType: json['contentSubType'] as dynamic,
|
||||
trackId: json['trackId'] as dynamic,
|
||||
cover: json['cover'] == null
|
||||
? null
|
||||
: Cover.fromJson(json['cover'] as Map<String, dynamic>),
|
||||
title: json['title'] as String?,
|
||||
subTitle: json['subTitle'] as dynamic,
|
||||
cardUrl: json['cardUrl'] as String?,
|
||||
belowLabels: (json['belowLabels'] as List<dynamic>?)
|
||||
?.map((e) => BelowLabel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
topRightLabels: json['topRightLabels'] as dynamic,
|
||||
bottomRightLabels: json['bottomRightLabels'] as dynamic,
|
||||
topLeftLabels: json['topLeftLabels'] as dynamic,
|
||||
bottomLeftLabels: json['bottomLeftLabels'] as dynamic,
|
||||
titleFrontLabels: json['titleFrontLabels'] as List<dynamic>?,
|
||||
priceBehindLabels: json['priceBehindLabels'] as dynamic,
|
||||
netPrice: json['netPrice'] == null
|
||||
? null
|
||||
: NetPrice.fromJson(json['netPrice'] as Map<String, dynamic>),
|
||||
userInteractInfos: json['userInteractInfos'] as dynamic,
|
||||
benefitInfos: (json['benefitInfos'] as List<dynamic>?)
|
||||
?.map((e) => BenefitInfo.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
reportParams: json['reportParams'] == null
|
||||
? null
|
||||
: ReportParams.fromJson(json['reportParams'] as Map<String, dynamic>),
|
||||
ichibanItem: json['ichibanItem'] as dynamic,
|
||||
isMarketItem: json['isMarketItem'] as bool?,
|
||||
remainBoxStr: json['remainBoxStr'] as dynamic,
|
||||
surpriseTips: json['surpriseTips'] as dynamic,
|
||||
outSchemaUrl: json['outSchemaUrl'] as String?,
|
||||
itemCode: json['itemCode'] as int?,
|
||||
merchantId: json['merchantId'] as dynamic,
|
||||
itemSource: json['itemSource'] as int?,
|
||||
itemSourceName: json['itemSourceName'] as String?,
|
||||
sourceDesc: json['sourceDesc'] == null
|
||||
? null
|
||||
: SourceDesc.fromJson(json['sourceDesc'] as Map<String, dynamic>),
|
||||
sourceFrontTag: json['sourceFrontTag'] == null
|
||||
? null
|
||||
: SourceFrontTag.fromJson(
|
||||
json['sourceFrontTag'] as Map<String, dynamic>,
|
||||
),
|
||||
openWhiteList: (json['openWhiteList'] as List?)?.fromCast(),
|
||||
sellOut: json['sellOut'] as bool?,
|
||||
status: json['status'] as int?,
|
||||
preSaleEnd: json['preSaleEnd'] as bool?,
|
||||
preSaleNotStart: json['preSaleNotStart'] as bool?,
|
||||
jumpType: json['jumpType'] as int?,
|
||||
lrpriceStr: json['lrpriceStr'] as dynamic,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
class ReportParams {
|
||||
String? trail;
|
||||
String? trackId;
|
||||
|
||||
ReportParams({this.trail, this.trackId});
|
||||
|
||||
factory ReportParams.fromJson(Map<String, dynamic> json) => ReportParams(
|
||||
trail: json['trail'] as String?,
|
||||
trackId: json['track_id'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
class SourceDesc {
|
||||
int? tagType;
|
||||
String? title;
|
||||
String? titleDayColor1;
|
||||
String? titleDayColor2;
|
||||
String? titleNightColor1;
|
||||
String? titleNightColor2;
|
||||
int? cornerRadius;
|
||||
int? useBoard;
|
||||
String? backDayColor1;
|
||||
String? backDayColor2;
|
||||
String? backNightColor1;
|
||||
String? backNightColor2;
|
||||
|
||||
SourceDesc({
|
||||
this.tagType,
|
||||
this.title,
|
||||
this.titleDayColor1,
|
||||
this.titleDayColor2,
|
||||
this.titleNightColor1,
|
||||
this.titleNightColor2,
|
||||
this.cornerRadius,
|
||||
this.useBoard,
|
||||
this.backDayColor1,
|
||||
this.backDayColor2,
|
||||
this.backNightColor1,
|
||||
this.backNightColor2,
|
||||
});
|
||||
|
||||
factory SourceDesc.fromJson(Map<String, dynamic> json) => SourceDesc(
|
||||
tagType: json['tagType'] as int?,
|
||||
title: json['title'] as String?,
|
||||
titleDayColor1: json['titleDayColor1'] as String?,
|
||||
titleDayColor2: json['titleDayColor2'] as String?,
|
||||
titleNightColor1: json['titleNightColor1'] as String?,
|
||||
titleNightColor2: json['titleNightColor2'] as String?,
|
||||
cornerRadius: json['cornerRadius'] as int?,
|
||||
useBoard: json['useBoard'] as int?,
|
||||
backDayColor1: json['backDayColor1'] as String?,
|
||||
backDayColor2: json['backDayColor2'] as String?,
|
||||
backNightColor1: json['backNightColor1'] as String?,
|
||||
backNightColor2: json['backNightColor2'] as String?,
|
||||
);
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
class SourceFrontTag {
|
||||
int? tagType;
|
||||
String? title;
|
||||
String? titleDayColor1;
|
||||
String? titleDayColor2;
|
||||
String? titleNightColor1;
|
||||
String? titleNightColor2;
|
||||
int? cornerRadius;
|
||||
int? useBoard;
|
||||
String? backDayColor1;
|
||||
String? backDayColor2;
|
||||
String? backNightColor1;
|
||||
String? backNightColor2;
|
||||
|
||||
SourceFrontTag({
|
||||
this.tagType,
|
||||
this.title,
|
||||
this.titleDayColor1,
|
||||
this.titleDayColor2,
|
||||
this.titleNightColor1,
|
||||
this.titleNightColor2,
|
||||
this.cornerRadius,
|
||||
this.useBoard,
|
||||
this.backDayColor1,
|
||||
this.backDayColor2,
|
||||
this.backNightColor1,
|
||||
this.backNightColor2,
|
||||
});
|
||||
|
||||
factory SourceFrontTag.fromJson(Map<String, dynamic> json) {
|
||||
return SourceFrontTag(
|
||||
tagType: json['tagType'] as int?,
|
||||
title: json['title'] as String?,
|
||||
titleDayColor1: json['titleDayColor1'] as String?,
|
||||
titleDayColor2: json['titleDayColor2'] as String?,
|
||||
titleNightColor1: json['titleNightColor1'] as String?,
|
||||
titleNightColor2: json['titleNightColor2'] as String?,
|
||||
cornerRadius: json['cornerRadius'] as int?,
|
||||
useBoard: json['useBoard'] as int?,
|
||||
backDayColor1: json['backDayColor1'] as String?,
|
||||
backDayColor2: json['backDayColor2'] as String?,
|
||||
backNightColor1: json['backNightColor1'] as String?,
|
||||
backNightColor2: json['backNightColor2'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user