Notifiche
Purpose
The Notifiche collection stores notification documents delivered to users.
Its purpose is to keep track of system and user-facing messages, including titles, content, icons, and timestamps.
Document schema
{
"content": "string",
"data": {
"__time__": "timestamp"
},
"icon": "string",
"title": "string"
}
Indexes
This collection does not have external indexes.
Query examples
// Fetch a notification by ID
const notificationRef = doc(db, "Notifiche", notificationId);
const notificationSnap = await getDoc(notificationRef);
// Query all notifications ordered by date
const notificationsQuery = query(
collection(db, "Notifiche"),
orderBy("data.__time__", "desc")
);