update
This commit is contained in:
30
src/models/favorite.rs
Normal file
30
src/models/favorite.rs
Normal 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>,
|
||||
}
|
||||
Reference in New Issue
Block a user