summaryrefslogtreecommitdiff
path: root/src/database/song.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/song.rs')
-rw-r--r--src/database/song.rs18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/database/song.rs b/src/database/song.rs
index 95b05ba..a4c860c 100644
--- a/src/database/song.rs
+++ b/src/database/song.rs
@@ -5,27 +5,41 @@ use utoipa::ToSchema;
#[derive(Serialize, ToSchema)]
pub struct Song {
+ #[schema(example = "song name")]
name: Option<String>,
+ #[schema(example = "1")]
id: Option<i32>,
+ #[schema(example = "song lyrics...")]
lyrics: Option<String>,
+ #[schema(example = "album name")]
album_name: Option<String>,
+ #[schema(example = "1")]
album_id: Option<i32>,
+ #[schema(example = "artist name")]
artist_name: Option<String>,
+ #[schema(example = "1")]
artist_id: Option<i32>,
}
-#[derive(Serialize, Deserialize)]
+#[derive(Serialize, Deserialize, ToSchema)]
pub struct SongPost {
+ #[schema(example = "song name")]
name: Option<String>,
+ #[schema(example = "song lyrics...")]
lyrics: Option<String>,
+ #[schema(example = "1")]
album_id: Option<String>,
}
-#[derive(Serialize, Deserialize)]
+#[derive(Serialize, Deserialize, ToSchema)]
pub struct SongPut {
+ #[schema(example = "1")]
id: Option<String>,
+ #[schema(example = "song name")]
name: Option<String>,
+ #[schema(example = "song lyrics...")]
lyrics: Option<String>,
+ #[schema(example = "1")]
album_id: Option<String>,
}