Skip to main content
Version: 1.0.0

Brand

Purpose​

The Brand collection defines the structure of brands within the system.
Its purpose is to store brand metadata, logos, style configurations, references to lines, templates, and publishing details.

Document schema​

{
"app_id_ios": "string",
"app_package": "string",
"app_package_ios": "string",
"catalogsPageStyle": {
"catalogue_logo_position": "string",
"come_img_mobile": "string",
"cover_color": "string",
"cover_height_desktop": "string",
"cover_height_mobile": "string",
"cover_img": "string",
"cover_img_mobile": "string",
"cover_template": "string",
"primary_color": "string",
"secondary_color": "string"
},
"code_path": "string",
"data_consumption": "string",
"descrizione": "string",
"descrizione_en": "string",
"endDate": "string",
"glasses_number": "number",
"hdr_environment": "string",
"isPublic": "boolean",
"light_intensity_exponent": "number",
"listaRefsLinea": ["reference"],
"main_brand": "boolean",
"no_background_logo": "string",
"nome_brand": "string",
"show_single_dot_list": "boolean",
"startDate": "string",
"storage_consumption": {
"consumption": "number",
"modelsNumber": "number"
},
"take_pic_template": "reference",
"url_logo": "string",
"web_domain": "string",
"web_url": "string"
}

Indexes​

  • listaRefsLinea is a [] references to Linea collection;
  • take_pic_template is a reference to TakeFotoTemplate collection.

Query examples​

// Fetch the Reference Doc from Firebase
const brandRefDoc = doc(db, "Brand", brandId);

// Get the Document Snapshot from the Reference Doc
const brandRefSnap = await getDoc(brandRefDoc);

// Query brands by line reference
const brandsByLine = query(
collection(db, "Brand"),
where("listaRefsLinea", "array-contains", doc(db, "Linea", lineaId))
);

// Query brands by public status
const publicBrands = query(
collection(db, "Brand"),
where("isPublic", "==", true)
);