mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-25 11:36:45 +08:00
52
lib/models_new/msg/msg_like/content.dart
Normal file
52
lib/models_new/msg/msg_like/content.dart
Normal file
@@ -0,0 +1,52 @@
|
||||
class MsgLikeContent {
|
||||
int? itemId;
|
||||
int? pid;
|
||||
String? type;
|
||||
String? business;
|
||||
int? businessId;
|
||||
int? replyBusinessId;
|
||||
int? likeBusinessId;
|
||||
String? title;
|
||||
String? desc;
|
||||
String? image;
|
||||
String? uri;
|
||||
String? detailName;
|
||||
String? nativeUri;
|
||||
int? ctime;
|
||||
|
||||
MsgLikeContent({
|
||||
this.itemId,
|
||||
this.pid,
|
||||
this.type,
|
||||
this.business,
|
||||
this.businessId,
|
||||
this.replyBusinessId,
|
||||
this.likeBusinessId,
|
||||
this.title,
|
||||
this.desc,
|
||||
this.image,
|
||||
this.uri,
|
||||
this.detailName,
|
||||
this.nativeUri,
|
||||
this.ctime,
|
||||
});
|
||||
|
||||
factory MsgLikeContent.fromJson(Map<String, dynamic> json) {
|
||||
return MsgLikeContent(
|
||||
itemId: json['item_id'] as int?,
|
||||
pid: json['pid'] as int?,
|
||||
type: json['type'] as String?,
|
||||
business: json['business'] as String?,
|
||||
businessId: json['business_id'] as int?,
|
||||
replyBusinessId: json['reply_business_id'] as int?,
|
||||
likeBusinessId: json['like_business_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
desc: json['desc'] as String?,
|
||||
image: json['image'] as String?,
|
||||
uri: json['uri'] as String?,
|
||||
detailName: json['detail_name'] as String?,
|
||||
nativeUri: json['native_uri'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
);
|
||||
}
|
||||
}
|
||||
13
lib/models_new/msg/msg_like/cursor.dart
Normal file
13
lib/models_new/msg/msg_like/cursor.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Cursor {
|
||||
bool? isEnd;
|
||||
int? id;
|
||||
int? time;
|
||||
|
||||
Cursor({this.isEnd, this.id, this.time});
|
||||
|
||||
factory Cursor.fromJson(Map<String, dynamic> json) => Cursor(
|
||||
isEnd: json['is_end'] as bool?,
|
||||
id: json['id'] as int?,
|
||||
time: json['time'] as int?,
|
||||
);
|
||||
}
|
||||
18
lib/models_new/msg/msg_like/data.dart
Normal file
18
lib/models_new/msg/msg_like/data.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:PiliPlus/models_new/msg/msg_like/latest.dart';
|
||||
import 'package:PiliPlus/models_new/msg/msg_like/total.dart';
|
||||
|
||||
class MsgLikeData {
|
||||
Latest? latest;
|
||||
Total? total;
|
||||
|
||||
MsgLikeData({this.latest, this.total});
|
||||
|
||||
factory MsgLikeData.fromJson(Map<String, dynamic> json) => MsgLikeData(
|
||||
latest: json['latest'] == null
|
||||
? null
|
||||
: Latest.fromJson(json['latest'] as Map<String, dynamic>),
|
||||
total: json['total'] == null
|
||||
? null
|
||||
: Total.fromJson(json['total'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
34
lib/models_new/msg/msg_like/item.dart
Normal file
34
lib/models_new/msg/msg_like/item.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
import 'package:PiliPlus/models_new/msg/msg_like/content.dart';
|
||||
|
||||
import 'package:PiliPlus/models_new/msg/msg_like/user.dart';
|
||||
|
||||
class MsgLikeItem {
|
||||
int? id;
|
||||
List<User>? users;
|
||||
MsgLikeContent? item;
|
||||
int? counts;
|
||||
int? likeTime;
|
||||
int? noticeState;
|
||||
|
||||
MsgLikeItem({
|
||||
this.id,
|
||||
this.users,
|
||||
this.item,
|
||||
this.counts,
|
||||
this.likeTime,
|
||||
this.noticeState,
|
||||
});
|
||||
|
||||
factory MsgLikeItem.fromJson(Map<String, dynamic> json) => MsgLikeItem(
|
||||
id: json['id'] as int?,
|
||||
users: (json['users'] as List<dynamic>?)
|
||||
?.map((e) => User.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
item: json['item'] == null
|
||||
? null
|
||||
: MsgLikeContent.fromJson(json['item'] as Map<String, dynamic>),
|
||||
counts: json['counts'] as int?,
|
||||
likeTime: json['like_time'] as int?,
|
||||
noticeState: json['notice_state'] as int?,
|
||||
);
|
||||
}
|
||||
15
lib/models_new/msg/msg_like/latest.dart
Normal file
15
lib/models_new/msg/msg_like/latest.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/msg/msg_like/item.dart';
|
||||
|
||||
class Latest {
|
||||
List<MsgLikeItem>? items;
|
||||
int? lastViewAt;
|
||||
|
||||
Latest({this.items, this.lastViewAt});
|
||||
|
||||
factory Latest.fromJson(Map<String, dynamic> json) => Latest(
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => MsgLikeItem.fromJson(e))
|
||||
.toList(),
|
||||
lastViewAt: json['last_view_at'] as int?,
|
||||
);
|
||||
}
|
||||
18
lib/models_new/msg/msg_like/total.dart
Normal file
18
lib/models_new/msg/msg_like/total.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:PiliPlus/models_new/msg/msg_like/cursor.dart';
|
||||
import 'package:PiliPlus/models_new/msg/msg_like/item.dart';
|
||||
|
||||
class Total {
|
||||
Cursor? cursor;
|
||||
List<MsgLikeItem>? items;
|
||||
|
||||
Total({this.cursor, this.items});
|
||||
|
||||
factory Total.fromJson(Map<String, dynamic> json) => Total(
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => MsgLikeItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
26
lib/models_new/msg/msg_like/user.dart
Normal file
26
lib/models_new/msg/msg_like/user.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
class User {
|
||||
int? mid;
|
||||
int? fans;
|
||||
String? nickname;
|
||||
String? avatar;
|
||||
String? midLink;
|
||||
bool? follow;
|
||||
|
||||
User({
|
||||
this.mid,
|
||||
this.fans,
|
||||
this.nickname,
|
||||
this.avatar,
|
||||
this.midLink,
|
||||
this.follow,
|
||||
});
|
||||
|
||||
factory User.fromJson(Map<String, dynamic> json) => User(
|
||||
mid: json['mid'] as int?,
|
||||
fans: json['fans'] as int?,
|
||||
nickname: json['nickname'] as String?,
|
||||
avatar: json['avatar'] as String?,
|
||||
midLink: json['mid_link'] as String?,
|
||||
follow: json['follow'] as bool?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user