Files
PiliPlus/lib/models_new/msg/msg_sys/data.dart
dom 5795122510 opt import
Signed-off-by: dom <githubaccount56556@proton.me>
2026-05-21 12:24:56 +08:00

34 lines
677 B
Dart

import 'dart:convert' show jsonDecode;
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?;
}
}