From ae7ef10b67737f08a86743f687bca30a12e9e17a Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 12 Jul 2026 19:38:03 +0200 Subject: first stable --- src/models/mod.rs | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/models/mod.rs (limited to 'src/models/mod.rs') diff --git a/src/models/mod.rs b/src/models/mod.rs new file mode 100644 index 0000000..c847ea3 --- /dev/null +++ b/src/models/mod.rs @@ -0,0 +1,44 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Account { + pub id: i64, + pub username: String, + pub is_superuser: bool, + pub password_change_required: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Instance { + pub id: i64, + pub name: String, + pub version: String, + pub server_type: String, + pub world_source: String, + pub world_seed: Option, + pub level_type: String, + pub has_modpack: bool, + pub memory_mb: i32, + pub difficulty: i32, + pub gamemode: i32, + pub max_players: i32, + pub pvp: bool, + pub motd: String, + pub rcon_password: String, + pub is_active: bool, + pub created_at: String, + pub updated_at: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Backup { + pub id: i64, + pub instance_id: i64, + pub filename: String, + pub created_at: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct PlayerEntry { + pub username: String, +} -- cgit v1.2.3