prosapp_web_app has chat, dashboard, calendar, support, 13 providers and Fluro URL routing. Keep Dockerfile + nginx.conf from previous prosappweb. Upgrade google_fonts 6.2.1 → 8.1.0 (Dart 3.12 compat fix). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
37 lines
786 B
Dart
37 lines
786 B
Dart
class MessageEntity {
|
|
final String ownerId;
|
|
final String content;
|
|
final DateTime createdAt;
|
|
|
|
const MessageEntity({
|
|
required this.ownerId,
|
|
required this.content,
|
|
required this.createdAt,
|
|
});
|
|
|
|
static MessageEntity fromDocument(Map<String, dynamic> doc) {
|
|
return MessageEntity(
|
|
ownerId: doc['owner_id'] as String,
|
|
content: doc['content'] as String,
|
|
createdAt: DateTime.parse(doc['created_at'] as String),
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toDocument() {
|
|
return {
|
|
'owner_id': ownerId,
|
|
'content': content,
|
|
'created_at': createdAt.toIso8601String(),
|
|
};
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return '''MessageEntity{
|
|
ownerId: $ownerId,
|
|
content: $content,
|
|
createdAt: $createdAt
|
|
}''';
|
|
}
|
|
}
|