- Implemented AppFooter widget for mobile and desktop views. - Created ChildrenSidebar widget to display children's information. - Developed AppLayout to manage app structure with optional footer. - Added ChildrenSidebar for selecting children and displaying their status. - Introduced DashboardAppBar for navigation and user actions. - Built WMainContentArea for displaying assistant details and calendar. - Created MainContentArea to manage contracts and events display. - Implemented MessagingSidebar for messaging functionality. - Updated widget tests to reflect new structure and imports.
42 lines
1.1 KiB
Dart
42 lines
1.1 KiB
Dart
class NotificationModel {
|
|
final String id;
|
|
final String title;
|
|
final String content;
|
|
final NotificationType type;
|
|
final DateTime createdAt;
|
|
final bool isRead;
|
|
final String? actionUrl;
|
|
final Map<String, dynamic>? metadata;
|
|
|
|
NotificationModel({
|
|
required this.id,
|
|
required this.title,
|
|
required this.content,
|
|
required this.type,
|
|
required this.createdAt,
|
|
this.isRead = false,
|
|
this.actionUrl,
|
|
this.metadata,
|
|
});
|
|
|
|
factory NotificationModel.fromJson(Map<String, dynamic> json) {
|
|
return NotificationModel(
|
|
id: json['id'],
|
|
title: json['title'],
|
|
content: json['content'],
|
|
type: NotificationType.values.byName(json['type']),
|
|
createdAt: DateTime.parse(json['createdAt']),
|
|
isRead: json['isRead'] ?? false,
|
|
actionUrl: json['actionUrl'],
|
|
metadata: json['metadata'],
|
|
);
|
|
}
|
|
}
|
|
|
|
enum NotificationType {
|
|
newEvent, // Nouvel événement
|
|
fileModified, // Dossier modifié
|
|
contractPending, // Contrat en attente
|
|
paymentPending, // Paiement en attente
|
|
unreadMessage, // Message non lu
|
|
} |