update
Some checks failed
Rust CI / Build Release (push) Has been cancelled
Rust CI / Cargo Check (push) Has been cancelled

This commit is contained in:
lychang
2026-07-19 15:04:22 +08:00
parent b915e69222
commit 82653c1a6c
40 changed files with 7778 additions and 1 deletions

30
src/models/favorite.rs Normal file
View File

@@ -0,0 +1,30 @@
use serde::{Deserialize, Serialize};
use uuid::Uuid;
#[derive(Debug, Serialize, Deserialize)]
pub struct Favorite {
pub id: Uuid,
pub user_id: String,
pub image_id: Uuid,
pub album_id: Uuid,
pub created_at: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct CreateFavorite {
pub image_id: Uuid,
pub album_id: Uuid,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct FavoriteWithImage {
pub favorite: Favorite,
pub image: super::image::Image,
pub album_title: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct FavoriteStatus {
pub is_favorited: bool,
pub favorite_id: Option<Uuid>,
}