feat: implement media listing with sorting and filtering options
This commit is contained in:
18
libertas_api/src/schema.rs
Normal file
18
libertas_api/src/schema.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct MediaResponse {
|
||||
pub id: uuid::Uuid,
|
||||
pub storage_path: String,
|
||||
pub original_filename: String,
|
||||
pub mime_type: String,
|
||||
pub hash: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct ListMediaParams {
|
||||
pub sort_by: Option<String>,
|
||||
pub order: Option<String>,
|
||||
// You can add future filters here, e.g.:
|
||||
// pub mime_type: Option<String>,
|
||||
}
|
||||
Reference in New Issue
Block a user