Solian/lib/models/notification.dart

38 lines
816 B
Dart
Raw Normal View History

import 'package:freezed_annotation/freezed_annotation.dart';
part 'notification.g.dart';
@JsonSerializable()
2024-05-18 10:17:16 +00:00
class Notification {
int id;
DateTime createdAt;
DateTime updatedAt;
DateTime? deletedAt;
String title;
String? subtitle;
String body;
String? avatar;
String? picture;
2024-05-18 10:17:16 +00:00
int? senderId;
int accountId;
2024-05-18 10:17:16 +00:00
Notification({
required this.id,
required this.createdAt,
required this.updatedAt,
2024-05-28 16:14:41 +00:00
required this.deletedAt,
required this.title,
required this.subtitle,
required this.body,
required this.avatar,
required this.picture,
2024-05-28 16:14:41 +00:00
required this.senderId,
required this.accountId,
2024-05-18 10:17:16 +00:00
});
factory Notification.fromJson(Map<String, dynamic> json) =>
_$NotificationFromJson(json);
2024-05-18 10:17:16 +00:00
Map<String, dynamic> toJson() => _$NotificationToJson(this);
2024-05-18 10:17:16 +00:00
}