mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
34 lines
661 B
Dart
34 lines
661 B
Dart
import 'dart:convert';
|
|
|
|
class MsgSysItem {
|
|
int? id;
|
|
int? cursor;
|
|
String? title;
|
|
String? content;
|
|
String? timeAt;
|
|
|
|
MsgSysItem({
|
|
this.id,
|
|
this.cursor,
|
|
this.title,
|
|
this.content,
|
|
this.timeAt,
|
|
});
|
|
|
|
MsgSysItem.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'] as int?;
|
|
cursor = json['cursor'] as int?;
|
|
title = json['title'] as String?;
|
|
content = json['content'] as String?;
|
|
if (content != null) {
|
|
try {
|
|
dynamic json = jsonDecode(content!);
|
|
if (json?['web'] != null) {
|
|
content = json['web'];
|
|
}
|
|
} catch (_) {}
|
|
}
|
|
timeAt = json['time_at'] as String?;
|
|
}
|
|
}
|