feat: enhance album and media management with update and delete functionalities

This commit is contained in:
2025-11-02 18:46:26 +01:00
parent a36b59a5fb
commit 13bb9e6b3e
14 changed files with 334 additions and 43 deletions

View File

@@ -1,3 +1,6 @@
use serde::Serialize;
use uuid::Uuid;
use crate::models::AlbumPermission;
pub struct UploadMediaData<'a> {
@@ -26,6 +29,12 @@ pub struct CreateAlbumData<'a> {
pub is_public: bool,
}
pub struct UpdateAlbumData<'a> {
pub name: Option<&'a str>,
pub description: Option<Option<&'a str>>,
pub is_public: Option<bool>,
}
pub struct AddMediaToAlbumData {
pub album_id: uuid::Uuid,
pub media_ids: Vec<uuid::Uuid>,
@@ -36,3 +45,10 @@ pub struct ShareAlbumData {
pub target_user_id: uuid::Uuid,
pub permission: AlbumPermission,
}
#[derive(Serialize)]
pub struct UserResponse {
pub id: Uuid,
pub username: String,
pub email: String,
}