mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
refa: article (#757)
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
47
lib/models/dynamics/article_view/vip.dart
Normal file
47
lib/models/dynamics/article_view/vip.dart
Normal file
@@ -0,0 +1,47 @@
|
||||
import 'label.dart';
|
||||
|
||||
class Vip {
|
||||
int? type;
|
||||
int? status;
|
||||
int? dueDate;
|
||||
int? vipPayType;
|
||||
int? themeType;
|
||||
Label? label;
|
||||
int? avatarSubscript;
|
||||
String? nicknameColor;
|
||||
|
||||
Vip({
|
||||
this.type,
|
||||
this.status,
|
||||
this.dueDate,
|
||||
this.vipPayType,
|
||||
this.themeType,
|
||||
this.label,
|
||||
this.avatarSubscript,
|
||||
this.nicknameColor,
|
||||
});
|
||||
|
||||
factory Vip.fromJson(Map<String, dynamic> json) => Vip(
|
||||
type: json['type'] as int?,
|
||||
status: json['status'] as int?,
|
||||
dueDate: json['due_date'] as int?,
|
||||
vipPayType: json['vip_pay_type'] as int?,
|
||||
themeType: json['theme_type'] as int?,
|
||||
label: json['label'] == null
|
||||
? null
|
||||
: Label.fromJson(json['label'] as Map<String, dynamic>),
|
||||
avatarSubscript: json['avatar_subscript'] as int?,
|
||||
nicknameColor: json['nickname_color'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'type': type,
|
||||
'status': status,
|
||||
'due_date': dueDate,
|
||||
'vip_pay_type': vipPayType,
|
||||
'theme_type': themeType,
|
||||
'label': label?.toJson(),
|
||||
'avatar_subscript': avatarSubscript,
|
||||
'nickname_color': nicknameColor,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user