Playback queue #12

Open
phoenix wants to merge 5 commits from playback_queue into main
pull from: playback_queue
2 changed files with 29 additions and 0 deletions
Showing only changes of commit 8becd9a49c - Show all commits

No files matched your search

+1
View File
@@ -4,6 +4,7 @@ pub mod constants;
pub mod coverart;
pub mod ledger;
pub mod login_result;
pub mod playback_queue;
pub mod register_result;
pub mod song;
pub mod token;
+28
View File
@@ -0,0 +1,28 @@
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
/// Playback queue device type - Browser
pub const PLAYBACK_QUEUE_DEVICE_TYPE_BROWSER: &str = "BROWSER";
/// Playback queue device type - Mobile
pub const PLAYBACK_QUEUE_DEVICE_TYPE_MOBILE: &str = "MOBILE";
#[derive(Debug, Default, Deserialize, Serialize, ToSchema)]
pub struct PlaybackQueue {
pub id: uuid::Uuid,
pub name: String,
pub device_type: String,
pub user_id: uuid::Uuid,
#[serde(with = "time::serde::rfc3339::option")]
pub date_created: Option<time::OffsetDateTime>,
}
#[derive(Debug, Default, Deserialize, Serialize, ToSchema)]
pub struct PlaybackQueueItem {
pub id: uuid::Uuid,
pub queue_index: i32,
pub playback_queue_id: uuid::Uuid,
pub song_id: uuid::Uuid,
#[serde(with = "time::serde::rfc3339::option")]
pub date_created: Option<time::OffsetDateTime>,
}