Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1fd5e6064
|
||
|
|
6ab15a0cb8
|
||
|
|
b9c151ae02
|
||
|
|
f9548b9d36
|
||
|
|
8becd9a49c
|
||
|
|
6ec7c4e212 |
No files matched your search
Generated
+11
-11
@@ -19,9 +19,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anyhow"
|
name = "anyhow"
|
||||||
version = "1.0.104"
|
version = "1.0.105"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
|
checksum = "2cb931c189b85683d69a5cfad41d4d418671e1ac413dd209f3f2fc31e3cfd902"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "base64"
|
name = "base64"
|
||||||
@@ -43,9 +43,9 @@ checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.11.2"
|
version = "1.11.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "33ef9e3e8154a45c7a95cff4c1299702106ad94062d7bb85fdc5d3a5afd91d45"
|
checksum = "02f0e023adb368345ce0ca6cdfc0f24a06554468d0e8503e14a0841de79bfa69"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"find-msvc-tools",
|
"find-msvc-tools",
|
||||||
"shlex",
|
"shlex",
|
||||||
@@ -193,9 +193,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hashbrown"
|
name = "hashbrown"
|
||||||
version = "0.17.1"
|
version = "0.17.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
checksum = "735eaa21a6a5ffb2e84362faaeb90c05ba8e19797ca30428478cb6ea3a4921bc"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "indexmap"
|
||||||
@@ -217,9 +217,9 @@ checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "josekit"
|
name = "josekit"
|
||||||
version = "0.10.3"
|
version = "0.10.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a808e078330e6af222eb0044b71d4b1ff981bfef43e7bc8133a88234e0c86a0c"
|
checksum = "10d933e7101bcf70cec43045520e2c2dd1b1f5ba9bdd2f669ee8b4e0a2a67614"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"base64",
|
"base64",
|
||||||
@@ -322,9 +322,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pin-project-lite"
|
name = "pin-project-lite"
|
||||||
version = "0.2.17"
|
version = "0.2.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
checksum = "c938015719552d665fd0553b90d96cd7ff58e83e4c061ca99e6bb78865a72752"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pkg-config"
|
name = "pkg-config"
|
||||||
@@ -486,7 +486,7 @@ checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "simodels"
|
name = "simodels"
|
||||||
version = "0.11.20"
|
version = "0.11.21"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"josekit",
|
"josekit",
|
||||||
"rand",
|
"rand",
|
||||||
|
|||||||
+6
-4
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "simodels"
|
name = "simodels"
|
||||||
version = "0.11.20"
|
version = "0.11.21"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.95"
|
rust-version = "1.95"
|
||||||
description = "Models used for the soaricarus project"
|
description = "Models used for the soaricarus project"
|
||||||
@@ -12,19 +12,21 @@ serde_json = { version = "1.0.154" }
|
|||||||
rand = { version = "0.10.4" }
|
rand = { version = "0.10.4" }
|
||||||
time = { version = "0.3.55", features = ["formatting", "macros", "parsing", "serde"] }
|
time = { version = "0.3.55", features = ["formatting", "macros", "parsing", "serde"] }
|
||||||
uuid = { version = "1.29.3", features = ["v4", "serde"] }
|
uuid = { version = "1.29.3", features = ["v4", "serde"] }
|
||||||
josekit = { version = "0.10.3" }
|
josekit = { version = "0.10.4" }
|
||||||
utoipa = { version = "6.0.0", features = ["uuid", "time"] }
|
utoipa = { version = "6.0.0", features = ["uuid", "time"] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["full"]
|
default = ["full"]
|
||||||
full = ["access_level", "album", "constants", "coverart", "ledger", "login_result", "song", "token", "types", "user", "util"]
|
full = ["access_level", "album", "constants", "coverart", "ledger", "login_result", "playback_queue", "song", "token", "types", "user", "util"]
|
||||||
auth = ["constants", "login_result", "token", "user"]
|
auth = ["constants", "login_result", "register_result", "token", "user"]
|
||||||
access_level = ["constants"]
|
access_level = ["constants"]
|
||||||
album = []
|
album = []
|
||||||
constants = []
|
constants = []
|
||||||
coverart = ["constants", "types"]
|
coverart = ["constants", "types"]
|
||||||
ledger = ["constants", "song", "types", "user"]
|
ledger = ["constants", "song", "types", "user"]
|
||||||
login_result = ["constants", "token", "user"]
|
login_result = ["constants", "token", "user"]
|
||||||
|
playback_queue = []
|
||||||
|
register_result = []
|
||||||
song = ["constants", "types"]
|
song = ["constants", "types"]
|
||||||
token = []
|
token = []
|
||||||
types = []
|
types = []
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ pub mod constants;
|
|||||||
pub mod coverart;
|
pub mod coverart;
|
||||||
pub mod ledger;
|
pub mod ledger;
|
||||||
pub mod login_result;
|
pub mod login_result;
|
||||||
|
pub mod playback_queue;
|
||||||
pub mod register_result;
|
pub mod register_result;
|
||||||
pub mod song;
|
pub mod song;
|
||||||
pub mod token;
|
pub mod token;
|
||||||
|
|||||||
@@ -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>,
|
||||||
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user