Modello
Purpose
The Modello collection defines the structure of a glasses variant (model).
Its purpose is to store product variant details, including colors, materials, 3D assets, posters, status, and links to associated files for AR/3D experiences.
Document schema
{
"3DImage": "string",
"RXAble": "boolean",
"codiceVariante": "string",
"coloreAste": "string",
"coloreFrame": "string",
"coloreLenti": "string",
"data_taken": "boolean",
"eanCode": "string",
"esaColorFramePrimary": "string",
"esaColorFrameSecondary": "string",
"esaColorLensesPrimary": "string",
"esaColorLensesSecondary": "string",
"frameMaterial": "string",
"lastUpdate": "string",
"lista_note": ["any"],
"loadingId": "string",
"lotto": "string",
"main_model": "boolean",
"modelPriority": "string",
"model_viewer_url": "string",
"modify_model": {
"rejectCount": "number",
"requestCount": "number",
"status": "boolean"
},
"nomeOcchiale": "string",
"photochromic": "boolean",
"poster": "string",
"poster2": "string",
"poster3": "string",
"poster4": "string",
"poster_no_background": "string",
"priority": "number",
"sku_model": "string",
"stato": "string",
"treatement": "string",
"upcCode": "string",
"urlDE": "string",
"urlES": "string",
"urlFR": "string",
"urlGlb": "string",
"urlGlbComplete": "string",
"urlGlbCompleteSize": "number",
"urlGlbSize": "number",
"urlProductPage": "string",
"urlUsdz": "string",
"urlUsdzComplete": "string",
"urlUsdzCompleteSize": "number",
"urlUsdzSize": "number",
"url_product_page": "string"
}
Indexes
This collection does not have external indexes.
Query examples
// Fetch the Reference Doc from Firebase
const modelloRefDoc = doc(db, "Modello", modelloId);
// Get the Document Snapshot from the Reference Doc
const modelloRefSnap = await getDoc(modelloRefDoc);
// Query models by SKU
const modelsBySKU = query(
collection(db, "Modello"),
where("sku_model", "==", "203118FLL49NU")
);
// Query published models
const publishedModels = query(
collection(db, "Modello"),
where("stato", "==", "Pubblicato")
);