This commit is contained in:
2025-03-06 22:38:53 +01:00
parent 6b406c24d3
commit f7fa5d5be4
8 changed files with 138 additions and 113 deletions
+18
View File
@@ -0,0 +1,18 @@
pub struct Player {
pub uuid: String,
pub cloaks: Vec<String>,
pub cloak: String,
}
pub struct Database {
pub players: mongodb::sync::Collection<Player>,
}
impl Database {
pub fn new(client: &mongodb::sync::Client) -> Self {
let db = client.database("saturn");
Self {
players: db.collection("players"),
}
}
}