feat: add HelpText model, service, and controller for dynamic help text management
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
class HelpTextContent {
|
||||
final String key;
|
||||
final String scope;
|
||||
final String title;
|
||||
final String content;
|
||||
final DateTime? updatedAt;
|
||||
|
||||
const HelpTextContent({
|
||||
required this.key,
|
||||
required this.scope,
|
||||
required this.title,
|
||||
required this.content,
|
||||
this.updatedAt,
|
||||
});
|
||||
|
||||
factory HelpTextContent.fromJson(Map<String, dynamic> json) {
|
||||
return HelpTextContent(
|
||||
key: (json['key'] as String? ?? '').trim(),
|
||||
scope: (json['scope'] as String? ?? 'default').trim(),
|
||||
title: (json['title'] as String? ?? '').trim(),
|
||||
content: (json['content'] as String? ?? '').trim(),
|
||||
updatedAt: json['updatedAt'] is String
|
||||
? DateTime.tryParse(json['updatedAt'] as String)
|
||||
: null,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user