2023-12-29 13:02:27 +08:00
|
|
|
use crate::folder_builder::ParentChildViews;
|
|
|
|
use std::collections::HashMap;
|
|
|
|
|
|
|
|
pub enum ImportData {
|
2024-01-12 14:34:59 +08:00
|
|
|
AppFlowyDataFolder { items: Vec<AppFlowyData> },
|
|
|
|
}
|
|
|
|
|
|
|
|
pub enum AppFlowyData {
|
|
|
|
Folder {
|
2023-12-30 13:44:09 +08:00
|
|
|
views: Vec<ParentChildViews>,
|
2023-12-29 13:02:27 +08:00
|
|
|
/// Used to update the [DatabaseViewTrackerList] when importing the database.
|
|
|
|
database_view_ids_by_database_id: HashMap<String, Vec<String>>,
|
2024-01-12 14:34:59 +08:00
|
|
|
},
|
|
|
|
CollabObject {
|
2023-12-29 13:02:27 +08:00
|
|
|
row_object_ids: Vec<String>,
|
|
|
|
document_object_ids: Vec<String>,
|
|
|
|
database_object_ids: Vec<String>,
|
|
|
|
},
|
|
|
|
}
|
2023-12-30 13:44:09 +08:00
|
|
|
|
|
|
|
pub struct ImportViews {
|
|
|
|
pub views: Vec<ParentChildViews>,
|
|
|
|
/// Used to update the [DatabaseViewTrackerList] when importing the database.
|
|
|
|
pub database_view_ids_by_database_id: HashMap<String, Vec<String>>,
|
|
|
|
}
|
2024-04-12 10:21:41 +02:00
|
|
|
|
|
|
|
pub struct SearchData {
|
|
|
|
/// The type of data that is stored in the search index row.
|
|
|
|
pub index_type: String,
|
|
|
|
|
|
|
|
/// The `View` that the row references.
|
|
|
|
pub view_id: String,
|
|
|
|
|
|
|
|
/// The ID that corresponds to the type that is stored.
|
|
|
|
/// View: view_id
|
|
|
|
/// Document: page_id
|
|
|
|
pub id: String,
|
|
|
|
|
|
|
|
/// The data that is stored in the search index row.
|
|
|
|
pub data: String,
|
|
|
|
}
|