pinakes-server: split dto module into submodules
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I1e9421d79010813992feb2b26c44d6796a6a6964
This commit is contained in:
parent
e66a2231b7
commit
d77e5b9f2f
21 changed files with 1530 additions and 1443 deletions
36
crates/pinakes-server/src/dto/batch.rs
Normal file
36
crates/pinakes-server/src/dto/batch.rs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct BatchTagRequest {
|
||||
pub media_ids: Vec<Uuid>,
|
||||
pub tag_ids: Vec<Uuid>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct BatchCollectionRequest {
|
||||
pub media_ids: Vec<Uuid>,
|
||||
pub collection_id: Uuid,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct BatchDeleteRequest {
|
||||
pub media_ids: Vec<Uuid>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct BatchUpdateRequest {
|
||||
pub media_ids: Vec<Uuid>,
|
||||
pub title: Option<String>,
|
||||
pub artist: Option<String>,
|
||||
pub album: Option<String>,
|
||||
pub genre: Option<String>,
|
||||
pub year: Option<i32>,
|
||||
pub description: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct BatchOperationResponse {
|
||||
pub processed: usize,
|
||||
pub errors: Vec<String>,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue