41 lines
810 B
Dart
41 lines
810 B
Dart
enum NotificationType {
|
|
general,
|
|
invoice,
|
|
event,
|
|
}
|
|
|
|
class NotificationEntity{
|
|
final String id;
|
|
final String title;
|
|
final String body;
|
|
final NotificationType type;
|
|
final DateTime dateTime;
|
|
final bool isRead;
|
|
|
|
NotificationEntity({
|
|
required this.title,
|
|
required this.body,
|
|
required this.dateTime,
|
|
required this.id,
|
|
required this.type,
|
|
this.isRead = false,
|
|
});
|
|
|
|
NotificationEntity copyWith({
|
|
String? id,
|
|
String? title,
|
|
String? body,
|
|
NotificationType? type,
|
|
DateTime? dateTime,
|
|
bool? isRead,
|
|
}) {
|
|
return NotificationEntity(
|
|
id: id ?? this.id,
|
|
title: title ?? this.title,
|
|
body: body ?? this.body,
|
|
type: type ?? this.type,
|
|
dateTime: dateTime ?? this.dateTime,
|
|
isRead: isRead ?? this.isRead,
|
|
);
|
|
}
|
|
} |