TagClass
Purpose
The TagClass collection defines the metadata and properties for tag categories used to classify glasses, products, or other entities.
Its purpose is to group models under shared attributes such as "New", "Featured", or custom tags.
Document schema
{
"background_color": "string",
"group": "string",
"group_order": "number",
"icon": "string",
"name": "string",
"short_name": "string",
"text_color": "string",
"type": "string"
}
Indexes
This collection does not have external indexes.
Query examples
// Fetch a TagClass by ID
const tagClassRef = doc(db, "TagClass", tagClassId);
const tagClassSnap = await getDoc(tagClassRef);
// Query tags ordered by group order
const tagClassQuery = query(
collection(db, "TagClass"),
orderBy("group_order", "asc")
);