28 lines
711 B
TypeScript
28 lines
711 B
TypeScript
export interface Notification {
|
|
id: string;
|
|
source: 'leantime' | 'nextcloud' | 'gitea' | 'dolibarr' | 'moodle';
|
|
sourceId: string; // Original ID from the source system
|
|
type: string; // Type of notification (e.g., 'task', 'mention', 'comment')
|
|
title: string;
|
|
message: string;
|
|
link?: string; // Link to view the item in the source system
|
|
isRead: boolean;
|
|
timestamp: Date;
|
|
priority: 'low' | 'normal' | 'high';
|
|
user: {
|
|
id: string;
|
|
name?: string;
|
|
};
|
|
metadata?: Record<string, any>; // Additional source-specific data
|
|
}
|
|
|
|
export interface NotificationCount {
|
|
total: number;
|
|
unread: number;
|
|
sources: {
|
|
[key: string]: {
|
|
total: number;
|
|
unread: number;
|
|
}
|
|
};
|
|
}
|