mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
37
lib/models_new/member_card_info/card.dart
Normal file
37
lib/models_new/member_card_info/card.dart
Normal file
@@ -0,0 +1,37 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class Card {
|
||||
String? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
int? fans;
|
||||
int? attention;
|
||||
BaseOfficialVerify? officialVerify;
|
||||
Vip? vip;
|
||||
|
||||
Card({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.face,
|
||||
this.fans,
|
||||
this.attention,
|
||||
this.officialVerify,
|
||||
this.vip,
|
||||
});
|
||||
|
||||
factory Card.fromJson(Map<String, dynamic> json) => Card(
|
||||
mid: json['mid'] as String?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
fans: json['fans'] as int?,
|
||||
attention: json['attention'] as int?,
|
||||
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>),
|
||||
);
|
||||
}
|
||||
31
lib/models_new/member_card_info/data.dart
Normal file
31
lib/models_new/member_card_info/data.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:PiliPlus/models_new/member_card_info/card.dart';
|
||||
|
||||
class MemberCardInfoData {
|
||||
Card? card;
|
||||
bool? following;
|
||||
int? archiveCount;
|
||||
int? articleCount;
|
||||
int? follower;
|
||||
int? likeNum;
|
||||
|
||||
MemberCardInfoData({
|
||||
this.card,
|
||||
this.following,
|
||||
this.archiveCount,
|
||||
this.articleCount,
|
||||
this.follower,
|
||||
this.likeNum,
|
||||
});
|
||||
|
||||
factory MemberCardInfoData.fromJson(Map<String, dynamic> json) =>
|
||||
MemberCardInfoData(
|
||||
card: json['card'] == null
|
||||
? null
|
||||
: Card.fromJson(json['card'] as Map<String, dynamic>),
|
||||
following: json['following'] as bool?,
|
||||
archiveCount: json['archive_count'] as int?,
|
||||
articleCount: json['article_count'] as int?,
|
||||
follower: json['follower'] as int?,
|
||||
likeNum: json['like_num'] as int?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user