Lang change

This commit is contained in:
KD
2025-03-09 00:54:02 +00:00
parent f7720f151b
commit c4d636ee4d
10 changed files with 155 additions and 29 deletions

26
src/access_level.rs Normal file
View File

@@ -0,0 +1,26 @@
use std::default::Default;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct AccessLevel {
pub id: i32,
pub level: String,
pub song_id: i32,
}
impl Default for AccessLevel {
fn default() -> Self {
AccessLevel {
id: -1,
level: String::new(),
song_id: -1,
}
}
}
impl AccessLevel {
pub fn _to_json(&self) -> Result<String, serde_json::Error> {
return serde_json::to_string_pretty(&self);
}
}