feat(item): remove reviews from item struct.

This commit is contained in:
ryan 2025-02-12 15:56:11 +03:00
parent bfded464c9
commit e72ed778a2
2 changed files with 1 additions and 9 deletions

View file

@ -116,7 +116,6 @@ pub fn ItemsList(
id: Uuid::new_v4().to_string(),
name: String::new(),
description: String::new(),
// reviews: vec![],
wikidata_id: None,
custom_properties: HashMap::new(),
}]);
@ -206,7 +205,7 @@ pub fn ItemsList(
name: db_item.name,
description: db_item.description,
wikidata_id: db_item.wikidata_id,
custom_properties, // Deserialized HashMap
custom_properties,
}
})
.collect();

View file

@ -7,13 +7,6 @@ pub struct Item {
pub id: String,
pub name: String,
pub description: String,
// pub reviews: Vec<ReviewWithRating>,
pub wikidata_id: Option<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
}