rewrite
This commit is contained in:
@@ -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"),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user