feat: Basic structs

- Added Account struct
- Added Config struct
- Added empty Map struct
- Added Quest struct
This commit is contained in:
Alexey 2025-11-28 14:06:12 +03:00
commit 4e3c137f8b
8 changed files with 441 additions and 0 deletions

24
src/account/mod.rs Normal file
View file

@ -0,0 +1,24 @@
//! Module for handling user accounts
use serde::{ Serialize, Deserialize };
fn default_id() -> String {
"none".to_string()
}
/// User account struct, which can be (de-)serialized from/into TOML
#[derive(Serialize, Deserialize)]
pub struct Account {
/// User id, specific to used service
#[serde(default = "default_id")]
pub id: String,
/// User balance,
#[serde(default)]
pub balance: u32,
/// Id of room node where user is located
#[serde(default)]
pub location: u16
}