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

@@ -19,6 +19,7 @@ pub trait MediaRepository: Send + Sync {
height: Option<i32>,
location: Option<String>,
) -> CoreResult<()>;
async fn delete(&self, id: Uuid) -> CoreResult<()>;
}
#[async_trait]
@@ -36,6 +37,8 @@ pub trait AlbumRepository: Send + Sync {
async fn find_by_id(&self, id: Uuid) -> CoreResult<Option<Album>>;
async fn list_by_user(&self, user_id: Uuid) -> CoreResult<Vec<Album>>;
async fn add_media_to_album(&self, album_id: Uuid, media_ids: &[Uuid]) -> CoreResult<()>;
async fn update(&self, album: Album) -> CoreResult<()>;
async fn delete(&self, id: Uuid) -> CoreResult<()>;
}
#[async_trait]