Taglia
Purpose
The Taglia collection defines the size or grouping information associated with a catalogue reference.
Its purpose is to classify products (e.g., glasses) by lines, size groups, or other logical divisions.
Document schema
{
"catalogRef": "string",
"group": "string",
"groupOrder": "number",
"name": "string",
"type": "string"
}
Indexes
- catalogRef is a
referencesthe ID of theBrandcollection.
Query examples
// Fetch a Taglia by ID
const tagliaRef = doc(db, "Taglia", tagliaId);
const tagliaSnap = await getDoc(tagliaRef);
// Query all Taglia docs for a catalogue
const tagliaByCatalog = query(
collection(db, "Taglia"),
where("catalogRef", "==", catalogueId)
);
// Order Taglia groups by groupOrder
const orderedTaglia = query(
collection(db, "Taglia"),
orderBy("groupOrder", "asc")
);