1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-25 14:29:22 +00:00
comunicmobile/lib/models/notification.dart

61 lines
1.2 KiB
Dart
Raw Permalink Normal View History

/// Notification model
///
/// @author Pierre HUBERT
enum NotificationElementType {
USER_PAGE,
GROUP_PAGE,
CONVERSATION,
CONVERSATION_MESSAGE,
POST,
POST_TEXT,
POST_IMAGE,
POST_YOUTUBE,
POST_WEBLINK,
POST_PDF,
POST_TIMER,
POST_SURVEY,
COMMENT,
FRIENDSHIP_REQUEST,
GROUP_MEMBERSHIP,
}
enum NotificationType {
COMMENT_CREATED,
SENT_FRIEND_REQUEST,
ACCEPTED_FRIEND_REQUEST,
REJECTED_FRIEND_REQUEST,
ELEM_CREATED,
ELEM_UPDATED,
SENT_GROUP_MEMBERSHIP_INVITATION,
ACCEPTED_GROUP_MEMBERSHIP_INVITATION,
REJECTED_GROUP_MEMBERSHIP_INVITATION,
SENT_GROUP_MEMBERSHIP_REQUEST,
ACCEPTED_GROUP_MEMBERSHIP_REQUEST,
REJECTED_GROUP_MEMBERSHIP_REQUEST,
}
class Notification {
final int id;
final int timeCreate;
final bool seen;
final int fromUser;
final int onElemId;
final NotificationElementType onElemType;
final NotificationType type;
final int? fromContainerId;
final NotificationElementType? fromContainerType;
const Notification({
required this.id,
required this.timeCreate,
required this.seen,
required this.fromUser,
required this.onElemId,
required this.onElemType,
required this.type,
required this.fromContainerId,
required this.fromContainerType,
2022-03-11 16:13:54 +00:00
});
}