good structure

This commit is contained in:
2025-03-13 21:58:48 +01:00
parent c750dbd8f1
commit 663f395c6e
5 changed files with 59 additions and 1 deletions
+4 -1
View File
@@ -1,3 +1,6 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, Deserialize, Serialize)]
pub struct Player {
pub uuid: String,
pub cloaks: Vec<String>,
@@ -10,7 +13,7 @@ pub struct Database {
impl Database {
pub fn new(client: &mongodb::sync::Client) -> Self {
let db = client.database("saturn");
let db = client.database("saturnclient");
Self {
players: db.collection("players"),
}