Files
be_happy_public/lib/domain/entities/client_notification.dart
2026-05-12 12:02:40 +03:00

59 lines
1.2 KiB
Dart

enum NotificationType {
info,
attention,
warning,
}
enum NotificationCategory {
auth,
zone,
payment,
companyInfo,
adminInfo,
scooter,
}
class ClientNotification {
final int id;
final String content;
final int clientId;
final NotificationType type;
final NotificationCategory category;
final DateTime createdAt;
final DateTime? canceledAt;
final DateTime? readAt;
ClientNotification({
required this.id,
required this.content,
required this.clientId,
required this.type,
required this.category,
required this.createdAt,
this.canceledAt,
this.readAt,
});
ClientNotification copyWith({
int? id,
String? content,
int? clientId,
NotificationType? type,
NotificationCategory? category,
DateTime? createdAt,
DateTime? canceledAt,
DateTime? readAt,
}) {
return ClientNotification(
id: id ?? this.id,
content: content ?? this.content,
clientId: clientId ?? this.clientId,
type: type ?? this.type,
category: category ?? this.category,
createdAt: createdAt ?? this.createdAt,
canceledAt: canceledAt ?? this.canceledAt,
readAt: readAt ?? this.readAt,
);
}
}