mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 16:18:22 +08:00
feat: member cheese
feat: fav pugv Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -11,16 +11,16 @@ class Brief {
|
||||
}
|
||||
|
||||
class Img {
|
||||
num? aspectRatio;
|
||||
num aspectRatio;
|
||||
String? url;
|
||||
|
||||
Img({
|
||||
this.aspectRatio,
|
||||
required this.aspectRatio,
|
||||
this.url,
|
||||
});
|
||||
|
||||
factory Img.fromJson(Map<String, dynamic> json) => Img(
|
||||
aspectRatio: json['aspect_ratio'],
|
||||
aspectRatio: json['aspect_ratio'] ?? 1,
|
||||
url: json['url'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ class UserStatus {
|
||||
int? payPackPaid;
|
||||
int? sponsor;
|
||||
UserProgress? progress;
|
||||
int? favored;
|
||||
|
||||
UserStatus({
|
||||
this.areaLimit,
|
||||
@@ -21,6 +22,7 @@ class UserStatus {
|
||||
this.payPackPaid,
|
||||
this.sponsor,
|
||||
this.progress,
|
||||
this.favored,
|
||||
});
|
||||
|
||||
factory UserStatus.fromJson(Map<String, dynamic> json) => UserStatus(
|
||||
@@ -35,5 +37,6 @@ class UserStatus {
|
||||
progress: json['progress'] == null
|
||||
? null
|
||||
: UserProgress.fromJson(json['progress']),
|
||||
favored: json['favored'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
19
lib/models_new/space/space_cheese/data.dart
Normal file
19
lib/models_new/space/space_cheese/data.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/models_new/space/space_cheese/item.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_cheese/page.dart';
|
||||
|
||||
class SpaceCheeseData {
|
||||
List<SpaceCheeseItem>? items;
|
||||
SpaceCheesePage? page;
|
||||
|
||||
SpaceCheeseData({this.items, this.page});
|
||||
|
||||
factory SpaceCheeseData.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceCheeseData(
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => SpaceCheeseItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
page: json['page'] == null
|
||||
? null
|
||||
: SpaceCheesePage.fromJson(json['page'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
48
lib/models_new/space/space_cheese/item.dart
Normal file
48
lib/models_new/space/space_cheese/item.dart
Normal file
@@ -0,0 +1,48 @@
|
||||
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?)?.cast(),
|
||||
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?,
|
||||
);
|
||||
}
|
||||
16
lib/models_new/space/space_cheese/page.dart
Normal file
16
lib/models_new/space/space_cheese/page.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
class SpaceCheesePage {
|
||||
bool? next;
|
||||
int? num;
|
||||
int? size;
|
||||
int? total;
|
||||
|
||||
SpaceCheesePage({this.next, this.num, this.size, this.total});
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user