消息中心
This commit is contained in:
25
ln_jq_app/lib/pages/c_page/message/model.dart
Normal file
25
ln_jq_app/lib/pages/c_page/message/model.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
class MessageModel {
|
||||
final String id;
|
||||
final String title;
|
||||
final String content;
|
||||
final String createTime;
|
||||
int isRead; // 0: 未读, 1: 已读
|
||||
|
||||
MessageModel({
|
||||
required this.id,
|
||||
required this.title,
|
||||
required this.content,
|
||||
required this.createTime,
|
||||
required this.isRead,
|
||||
});
|
||||
|
||||
factory MessageModel.fromJson(Map<String, dynamic> json) {
|
||||
return MessageModel(
|
||||
id: json['id']?.toString() ?? '',
|
||||
title: json['title']?.toString() ?? '消息通知',
|
||||
content: json['content']?.toString() ?? '',
|
||||
createTime: json['createTime']?.toString() ?? '',
|
||||
isRead: json['isRead'] as int? ?? 0,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user