mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-17 07:36:14 +08:00
@@ -8,17 +8,17 @@ part 'archive.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Archive {
|
||||
@JsonKey(name: 'episodic_button')
|
||||
EpisodicButton? episodicButton;
|
||||
List<Order>? order;
|
||||
int? count;
|
||||
List<Item>? item;
|
||||
@JsonKey(name: 'episodic_button')
|
||||
EpisodicButton? episodicButton;
|
||||
List<Order>? order;
|
||||
int? count;
|
||||
List<SpaceItem>? item;
|
||||
|
||||
Archive({this.episodicButton, this.order, this.count, this.item});
|
||||
Archive({this.episodicButton, this.order, this.count, this.item});
|
||||
|
||||
factory Archive.fromJson(Map<String, dynamic> json) {
|
||||
return _$ArchiveFromJson(json);
|
||||
}
|
||||
factory Archive.fromJson(Map<String, dynamic> json) {
|
||||
return _$ArchiveFromJson(json);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => _$ArchiveToJson(this);
|
||||
Map<String, dynamic> toJson() => _$ArchiveToJson(this);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ Archive _$ArchiveFromJson(Map<String, dynamic> json) => Archive(
|
||||
.toList(),
|
||||
count: (json['count'] as num?)?.toInt(),
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => Item.fromJson(e as Map<String, dynamic>))
|
||||
?.map((e) => SpaceItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import 'vip.dart';
|
||||
part 'card.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Card {
|
||||
class SpaceCard {
|
||||
Avatar? avatar;
|
||||
String? mid;
|
||||
String? name;
|
||||
@@ -89,7 +89,7 @@ class Card {
|
||||
@JsonKey(name: 'has_digital_asset')
|
||||
bool? hasDigitalAsset;
|
||||
|
||||
Card({
|
||||
SpaceCard({
|
||||
this.avatar,
|
||||
this.mid,
|
||||
this.name,
|
||||
@@ -140,7 +140,7 @@ class Card {
|
||||
this.hasDigitalAsset,
|
||||
});
|
||||
|
||||
factory Card.fromJson(Map<String, dynamic> json) => _$CardFromJson(json);
|
||||
factory SpaceCard.fromJson(Map<String, dynamic> json) => _$CardFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$CardToJson(this);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'card.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Card _$CardFromJson(Map<String, dynamic> json) => Card(
|
||||
SpaceCard _$CardFromJson(Map<String, dynamic> json) => SpaceCard(
|
||||
avatar: json['avatar'] == null
|
||||
? null
|
||||
: Avatar.fromJson(json['avatar'] as Map<String, dynamic>),
|
||||
@@ -99,7 +99,7 @@ Card _$CardFromJson(Map<String, dynamic> json) => Card(
|
||||
hasDigitalAsset: json['has_digital_asset'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CardToJson(Card instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$CardToJson(SpaceCard instance) => <String, dynamic>{
|
||||
'avatar': instance.avatar,
|
||||
'mid': instance.mid,
|
||||
'name': instance.name,
|
||||
|
||||
@@ -6,7 +6,7 @@ part 'coin_archive.g.dart';
|
||||
@JsonSerializable()
|
||||
class CoinArchive {
|
||||
int? count;
|
||||
List<Item>? item;
|
||||
List<SpaceItem>? item;
|
||||
|
||||
CoinArchive({this.count, this.item});
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ part of 'coin_archive.dart';
|
||||
CoinArchive _$CoinArchiveFromJson(Map<String, dynamic> json) => CoinArchive(
|
||||
count: (json['count'] as num?)?.toInt(),
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((json) => Item.fromJson(json))
|
||||
?.map((json) => SpaceItem.fromJson(json))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:PiliPlus/models/space_article/data.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'archive.dart';
|
||||
@@ -13,12 +14,11 @@ import 'series.dart';
|
||||
import 'setting.dart';
|
||||
import 'tab.dart';
|
||||
import 'tab2.dart';
|
||||
import 'package:PiliPlus/models/space_article/data.dart' as space;
|
||||
|
||||
part 'data.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Data {
|
||||
class SpaceData {
|
||||
int? relation;
|
||||
@JsonKey(name: 'rel_special')
|
||||
int? relSpecial;
|
||||
@@ -30,11 +30,11 @@ class Data {
|
||||
bool? isParams;
|
||||
Setting? setting;
|
||||
Tab? tab;
|
||||
Card? card;
|
||||
Images? images;
|
||||
SpaceCard? card;
|
||||
SpaceImages? images;
|
||||
Archive? archive;
|
||||
Series? series;
|
||||
space.Data? article;
|
||||
SpaceArticleData? article;
|
||||
Season? season;
|
||||
@JsonKey(name: 'coin_archive')
|
||||
CoinArchive? coinArchive;
|
||||
@@ -55,7 +55,7 @@ class Data {
|
||||
dynamic live;
|
||||
UgcSeason? ugcSeason;
|
||||
|
||||
Data({
|
||||
SpaceData({
|
||||
this.relation,
|
||||
this.relSpecial,
|
||||
this.guestRelation,
|
||||
@@ -83,7 +83,7 @@ class Data {
|
||||
this.ugcSeason,
|
||||
});
|
||||
|
||||
factory Data.fromJson(Map<String, dynamic> json) => _$DataFromJson(json);
|
||||
factory SpaceData.fromJson(Map<String, dynamic> json) => _$DataFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DataToJson(this);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'data.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Data _$DataFromJson(Map<String, dynamic> json) => Data(
|
||||
SpaceData _$DataFromJson(Map<String, dynamic> json) => SpaceData(
|
||||
relation: (json['relation'] as num?)?.toInt(),
|
||||
relSpecial: (json['rel_special'] as num?)?.toInt(),
|
||||
guestRelation: (json['guest_relation'] as num?)?.toInt(),
|
||||
@@ -20,10 +20,10 @@ Data _$DataFromJson(Map<String, dynamic> json) => Data(
|
||||
: Tab.fromJson(json['tab'] as Map<String, dynamic>),
|
||||
card: json['card'] == null
|
||||
? null
|
||||
: Card.fromJson(json['card'] as Map<String, dynamic>),
|
||||
: SpaceCard.fromJson(json['card'] as Map<String, dynamic>),
|
||||
images: json['images'] == null
|
||||
? null
|
||||
: Images.fromJson(json['images'] as Map<String, dynamic>),
|
||||
: SpaceImages.fromJson(json['images'] as Map<String, dynamic>),
|
||||
archive: json['archive'] == null
|
||||
? null
|
||||
: Archive.fromJson(json['archive'] as Map<String, dynamic>),
|
||||
@@ -32,7 +32,7 @@ Data _$DataFromJson(Map<String, dynamic> json) => Data(
|
||||
: Series.fromJson(json['series'] as Map<String, dynamic>),
|
||||
article: json['article'] == null
|
||||
? null
|
||||
: space.Data.fromJson(json['article'] as Map<String, dynamic>),
|
||||
: SpaceArticleData.fromJson(json['article'] as Map<String, dynamic>),
|
||||
season: json['season'] == null
|
||||
? null
|
||||
: Season.fromJson(json['season'] as Map<String, dynamic>),
|
||||
@@ -67,7 +67,7 @@ Data _$DataFromJson(Map<String, dynamic> json) => Data(
|
||||
: null,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$DataToJson(Data instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$DataToJson(SpaceData instance) => <String, dynamic>{
|
||||
'relation': instance.relation,
|
||||
'rel_special': instance.relSpecial,
|
||||
'guest_relation': instance.guestRelation,
|
||||
|
||||
@@ -7,37 +7,37 @@ import 'purchase_button.dart';
|
||||
part 'images.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Images {
|
||||
String? imgUrl;
|
||||
@JsonKey(name: 'night_imgurl')
|
||||
String? nightImgurl;
|
||||
@JsonKey(name: 'has_garb')
|
||||
bool? hasGarb;
|
||||
@JsonKey(name: 'goods_available')
|
||||
bool? goodsAvailable;
|
||||
@JsonKey(name: 'purchase_button')
|
||||
PurchaseButton? purchaseButton;
|
||||
@JsonKey(name: 'entrance_button')
|
||||
EntranceButton? entranceButton;
|
||||
@JsonKey(name: 'digital_info')
|
||||
DigitalInfo? digitalInfo;
|
||||
@JsonKey(name: 'collection_top_simple')
|
||||
dynamic collectionTopSimple;
|
||||
class SpaceImages {
|
||||
String? imgUrl;
|
||||
@JsonKey(name: 'night_imgurl')
|
||||
String? nightImgurl;
|
||||
@JsonKey(name: 'has_garb')
|
||||
bool? hasGarb;
|
||||
@JsonKey(name: 'goods_available')
|
||||
bool? goodsAvailable;
|
||||
@JsonKey(name: 'purchase_button')
|
||||
PurchaseButton? purchaseButton;
|
||||
@JsonKey(name: 'entrance_button')
|
||||
EntranceButton? entranceButton;
|
||||
@JsonKey(name: 'digital_info')
|
||||
DigitalInfo? digitalInfo;
|
||||
@JsonKey(name: 'collection_top_simple')
|
||||
dynamic collectionTopSimple;
|
||||
|
||||
Images({
|
||||
this.imgUrl,
|
||||
this.nightImgurl,
|
||||
this.hasGarb,
|
||||
this.goodsAvailable,
|
||||
this.purchaseButton,
|
||||
this.entranceButton,
|
||||
this.digitalInfo,
|
||||
this.collectionTopSimple,
|
||||
});
|
||||
SpaceImages({
|
||||
this.imgUrl,
|
||||
this.nightImgurl,
|
||||
this.hasGarb,
|
||||
this.goodsAvailable,
|
||||
this.purchaseButton,
|
||||
this.entranceButton,
|
||||
this.digitalInfo,
|
||||
this.collectionTopSimple,
|
||||
});
|
||||
|
||||
factory Images.fromJson(Map<String, dynamic> json) {
|
||||
return _$ImagesFromJson(json);
|
||||
}
|
||||
factory SpaceImages.fromJson(Map<String, dynamic> json) {
|
||||
return _$ImagesFromJson(json);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => _$ImagesToJson(this);
|
||||
Map<String, dynamic> toJson() => _$ImagesToJson(this);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'images.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Images _$ImagesFromJson(Map<String, dynamic> json) => Images(
|
||||
SpaceImages _$ImagesFromJson(Map<String, dynamic> json) => SpaceImages(
|
||||
imgUrl: json['imgUrl'] as String?,
|
||||
nightImgurl: json['night_imgurl'] as String?,
|
||||
hasGarb: json['has_garb'] as bool?,
|
||||
@@ -25,7 +25,7 @@ Images _$ImagesFromJson(Map<String, dynamic> json) => Images(
|
||||
collectionTopSimple: json['collection_top_simple'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ImagesToJson(Images instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$ImagesToJson(SpaceImages instance) => <String, dynamic>{
|
||||
'imgUrl': instance.imgUrl,
|
||||
'night_imgurl': instance.nightImgurl,
|
||||
'has_garb': instance.hasGarb,
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'package:json_annotation/json_annotation.dart';
|
||||
part 'item.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Item {
|
||||
class SpaceItem {
|
||||
String? title;
|
||||
String? subtitle;
|
||||
String? tname;
|
||||
@@ -57,7 +57,7 @@ class Item {
|
||||
@JsonKey(name: 'publish_time_text')
|
||||
String? publishTimeText;
|
||||
|
||||
Item({
|
||||
SpaceItem({
|
||||
this.title,
|
||||
this.subtitle,
|
||||
this.tname,
|
||||
@@ -94,7 +94,7 @@ class Item {
|
||||
this.publishTimeText,
|
||||
});
|
||||
|
||||
factory Item.fromJson(Map<String, dynamic> json) => _$ItemFromJson(json);
|
||||
factory SpaceItem.fromJson(Map<String, dynamic> json) => _$ItemFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ItemToJson(this);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ part of 'item.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Item _$ItemFromJson(Map<String, dynamic> json) => Item(
|
||||
SpaceItem _$ItemFromJson(Map<String, dynamic> json) => SpaceItem(
|
||||
title: json['title'] as String?,
|
||||
subtitle: json['subtitle'] as String?,
|
||||
tname: json['tname'] as String?,
|
||||
@@ -45,7 +45,7 @@ Item _$ItemFromJson(Map<String, dynamic> json) => Item(
|
||||
publishTimeText: json['publish_time_text'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ItemToJson(Item instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$ItemToJson(SpaceItem instance) => <String, dynamic>{
|
||||
'title': instance.title,
|
||||
'subtitle': instance.subtitle,
|
||||
'tname': instance.tname,
|
||||
|
||||
@@ -6,7 +6,7 @@ part 'like_archive.g.dart';
|
||||
@JsonSerializable()
|
||||
class LikeArchive {
|
||||
int? count;
|
||||
List<Item>? item;
|
||||
List<SpaceItem>? item;
|
||||
|
||||
LikeArchive({this.count, this.item});
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ part of 'like_archive.dart';
|
||||
LikeArchive _$LikeArchiveFromJson(Map<String, dynamic> json) => LikeArchive(
|
||||
count: (json['count'] as num?)?.toInt(),
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((json) => Item.fromJson(json))
|
||||
?.map((json) => SpaceItem.fromJson(json))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ part 'season.g.dart';
|
||||
@JsonSerializable()
|
||||
class Season {
|
||||
int? count;
|
||||
List<Item>? item;
|
||||
List<SpaceArchiveItem>? item;
|
||||
|
||||
Season({this.count, this.item});
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ part of 'season.dart';
|
||||
Season _$SeasonFromJson(Map<String, dynamic> json) => Season(
|
||||
count: (json['count'] as num?)?.toInt(),
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => Item.fromJson(e as Map<String, dynamic>))
|
||||
?.map((e) => SpaceArchiveItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@ part 'space.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Space {
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
Data? data;
|
||||
int? code;
|
||||
String? message;
|
||||
int? ttl;
|
||||
SpaceData? data;
|
||||
|
||||
Space({this.code, this.message, this.ttl, this.data});
|
||||
Space({this.code, this.message, this.ttl, this.data});
|
||||
|
||||
factory Space.fromJson(Map<String, dynamic> json) => _$SpaceFromJson(json);
|
||||
factory Space.fromJson(Map<String, dynamic> json) => _$SpaceFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$SpaceToJson(this);
|
||||
Map<String, dynamic> toJson() => _$SpaceToJson(this);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ Space _$SpaceFromJson(Map<String, dynamic> json) => Space(
|
||||
ttl: (json['ttl'] as num?)?.toInt(),
|
||||
data: json['data'] == null
|
||||
? null
|
||||
: Data.fromJson(json['data'] as Map<String, dynamic>),
|
||||
: SpaceData.fromJson(json['data'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SpaceToJson(Space instance) => <String, dynamic>{
|
||||
|
||||
@@ -6,13 +6,13 @@ part 'tab2.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Tab2 {
|
||||
String? title;
|
||||
String? param;
|
||||
List<Item>? items;
|
||||
String? title;
|
||||
String? param;
|
||||
List<SpaceItem>? items;
|
||||
|
||||
Tab2({this.title, this.param, this.items});
|
||||
Tab2({this.title, this.param, this.items});
|
||||
|
||||
factory Tab2.fromJson(Map<String, dynamic> json) => _$Tab2FromJson(json);
|
||||
factory Tab2.fromJson(Map<String, dynamic> json) => _$Tab2FromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$Tab2ToJson(this);
|
||||
Map<String, dynamic> toJson() => _$Tab2ToJson(this);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ Tab2 _$Tab2FromJson(Map<String, dynamic> json) => Tab2(
|
||||
title: json['title'] as String?,
|
||||
param: json['param'] as String?,
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => Item.fromJson(e as Map<String, dynamic>))
|
||||
?.map((e) => SpaceItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user