feat(item): remove reviews from item struct.
This commit is contained in:
parent
bfded464c9
commit
e72ed778a2
2 changed files with 1 additions and 9 deletions
|
@ -116,7 +116,6 @@ pub fn ItemsList(
|
||||||
id: Uuid::new_v4().to_string(),
|
id: Uuid::new_v4().to_string(),
|
||||||
name: String::new(),
|
name: String::new(),
|
||||||
description: String::new(),
|
description: String::new(),
|
||||||
// reviews: vec![],
|
|
||||||
wikidata_id: None,
|
wikidata_id: None,
|
||||||
custom_properties: HashMap::new(),
|
custom_properties: HashMap::new(),
|
||||||
}]);
|
}]);
|
||||||
|
@ -206,7 +205,7 @@ pub fn ItemsList(
|
||||||
name: db_item.name,
|
name: db_item.name,
|
||||||
description: db_item.description,
|
description: db_item.description,
|
||||||
wikidata_id: db_item.wikidata_id,
|
wikidata_id: db_item.wikidata_id,
|
||||||
custom_properties, // Deserialized HashMap
|
custom_properties,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
|
@ -7,13 +7,6 @@ pub struct Item {
|
||||||
pub id: String,
|
pub id: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub description: String,
|
pub description: String,
|
||||||
// pub reviews: Vec<ReviewWithRating>,
|
|
||||||
pub wikidata_id: Option<String>,
|
pub wikidata_id: Option<String>,
|
||||||
pub custom_properties: HashMap<String, String>,
|
pub custom_properties: HashMap<String, String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
|
||||||
pub struct ReviewWithRating {
|
|
||||||
pub content: String,
|
|
||||||
pub rating: u8, // Ratings from 1 to 5
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue