|
1 | | -use super::{BaseModel, Pagination}; |
| 1 | +use super::BaseModel; |
2 | 2 | use crate::error::{Error, Result}; |
3 | 3 | use prost_types::Timestamp; |
4 | 4 | use serde::{Deserialize, Serialize}; |
@@ -91,20 +91,20 @@ pub struct MetaDataType { |
91 | 91 | // } |
92 | 92 | // } |
93 | 93 |
|
94 | | -/// `FileTypeMetaDataStruct` and `FolderTypeMetaDataStruct` are used to deserialize metadata from the database. |
95 | | -#[derive(Deserialize, Debug, Clone, Serialize, Default)] |
96 | | -pub struct FileTypeMetaDataStruct { |
| 94 | +// /// `FileTypeMetaDataStruct` and `FolderTypeMetaDataStruct` are used to deserialize metadata from the database. |
| 95 | +// #[derive(Deserialize, Debug, Clone, Serialize, Default)] |
| 96 | +// pub struct FileTypeMetaDataStruct { |
97 | 97 |
|
98 | | - /// Type of the file, e.g., "image/png", "application/pdf". |
99 | | - pub file_type: String, |
100 | | -} |
| 98 | +// /// Type of the file, e.g., "image/png", "application/pdf". |
| 99 | +// pub file_type: String, |
| 100 | +// } |
101 | 101 |
|
102 | | -/// `FolderTypeMetaDataStruct` is used to deserialize folder metadata from the database. |
103 | | -#[derive(Deserialize, Debug, Clone, Serialize, Default)] |
104 | | -pub struct FolderTypeMetaDataStruct { |
105 | | - /// Color associated with the folder, used for visual categorization. |
106 | | - pub color: String, |
107 | | -} |
| 102 | +// /// `FolderTypeMetaDataStruct` is used to deserialize folder metadata from the database. |
| 103 | +// #[derive(Deserialize, Debug, Clone, Serialize, Default)] |
| 104 | +// pub struct FolderTypeMetaDataStruct { |
| 105 | +// /// Color associated with the folder, used for visual categorization. |
| 106 | +// pub color: String, |
| 107 | +// } |
108 | 108 |
|
109 | 109 | // impl Default for MetaDataType { |
110 | 110 | // fn default() -> MetaDataType { |
@@ -269,31 +269,31 @@ impl TryFrom<MetaDataType> for Value { |
269 | 269 | } |
270 | 270 | } |
271 | 271 |
|
272 | | -impl TryFrom<Object> for FileTypeMetaDataStruct { |
273 | | - type Error = Error; |
274 | | - fn try_from(val: Object) -> Result<Self> { |
275 | | - let file_type = val.get("file_type").get_string()?; |
276 | | - Ok(Self { file_type }) |
277 | | - } |
278 | | -} |
| 272 | +// impl TryFrom<Object> for FileTypeMetaDataStruct { |
| 273 | +// type Error = Error; |
| 274 | +// fn try_from(val: Object) -> Result<Self> { |
| 275 | +// let file_type = val.get("file_type").get_string()?; |
| 276 | +// Ok(Self { file_type }) |
| 277 | +// } |
| 278 | +// } |
279 | 279 |
|
280 | | -impl TryFrom<Object> for FolderTypeMetaDataStruct { |
281 | | - type Error = Error; |
282 | | - fn try_from(val: Object) -> Result<Self> { |
283 | | - let color = val.get("color").get_string()?; |
284 | | - Ok(Self { color }) |
285 | | - } |
286 | | -} |
| 280 | +// impl TryFrom<Object> for FolderTypeMetaDataStruct { |
| 281 | +// type Error = Error; |
| 282 | +// fn try_from(val: Object) -> Result<Self> { |
| 283 | +// let color = val.get("color").get_string()?; |
| 284 | +// Ok(Self { color }) |
| 285 | +// } |
| 286 | +// } |
287 | 287 |
|
288 | | -/// `AssetPagination` is used to paginate a list of assets. |
289 | | -#[derive(Serialize, Debug, Deserialize, Clone, Default)] |
290 | | -pub struct AssetPagination { |
291 | | - /// List of assets in the current page. |
292 | | - pub data: Vec<AssetModel>, |
| 288 | +// /// `AssetPagination` is used to paginate a list of assets. |
| 289 | +// #[derive(Serialize, Debug, Deserialize, Clone, Default)] |
| 290 | +// pub struct AssetPagination { |
| 291 | +// /// List of assets in the current page. |
| 292 | +// pub data: Vec<AssetModel>, |
293 | 293 |
|
294 | | - /// Pagination information for the asset list. |
295 | | - pub pagination: Pagination, |
296 | | -} |
| 294 | +// /// Pagination information for the asset list. |
| 295 | +// pub pagination: Pagination, |
| 296 | +// } |
297 | 297 |
|
298 | 298 |
|
299 | 299 |
|
|
0 commit comments