Skip to main content
Version: 1.0.0

Coll_LogAccess

Purpose​

The Coll_LogAccess collection stores logs of user accesses and service usage.
Its purpose is to track authentication and interaction history, including device details, date, and the service accessed.


Document schema​

{
"account": "string",
"listaLog": [
{
"data": "string",
"dispositivo": "string",
"service": "string"
}
]
}

Indexes​

This collection does not have external indexes.

Query examples​

// Fetch the Reference Doc from Firebase
const logAccessRefDoc = doc(db, "Coll_LogAccess", logAccessId);
const logAccessSnap = await getDoc(logAccessRefDoc);

// Query logs by account
const logsByAccount = query(
collection(db, "Coll_LogAccess"),
where("account", "==", userEmail)
);

// Query logs by service
const logsByService = query(
collection(db, "Coll_LogAccess"),
where("listaLog.service", "==", "Tool Revisione")
);