diff options
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/mod.rs | 44 |
1 files changed, 44 insertions, 0 deletions
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 @@ | |||
| 1 | use serde::{Deserialize, Serialize}; | ||
| 2 | |||
| 3 | #[derive(Debug, Clone, Serialize, Deserialize)] | ||
| 4 | pub struct Account { | ||
| 5 | pub id: i64, | ||
| 6 | pub username: String, | ||
| 7 | pub is_superuser: bool, | ||
| 8 | pub password_change_required: bool, | ||
| 9 | } | ||
| 10 | |||
| 11 | #[derive(Debug, Clone, Serialize, Deserialize)] | ||
| 12 | pub struct Instance { | ||
| 13 | pub id: i64, | ||
| 14 | pub name: String, | ||
| 15 | pub version: String, | ||
| 16 | pub server_type: String, | ||
| 17 | pub world_source: String, | ||
| 18 | pub world_seed: Option<String>, | ||
| 19 | pub level_type: String, | ||
| 20 | pub has_modpack: bool, | ||
| 21 | pub memory_mb: i32, | ||
| 22 | pub difficulty: i32, | ||
| 23 | pub gamemode: i32, | ||
| 24 | pub max_players: i32, | ||
| 25 | pub pvp: bool, | ||
| 26 | pub motd: String, | ||
| 27 | pub rcon_password: String, | ||
| 28 | pub is_active: bool, | ||
| 29 | pub created_at: String, | ||
| 30 | pub updated_at: String, | ||
| 31 | } | ||
| 32 | |||
| 33 | #[derive(Debug, Clone, Serialize, Deserialize)] | ||
| 34 | pub struct Backup { | ||
| 35 | pub id: i64, | ||
| 36 | pub instance_id: i64, | ||
| 37 | pub filename: String, | ||
| 38 | pub created_at: String, | ||
| 39 | } | ||
| 40 | |||
| 41 | #[derive(Debug, Clone, Serialize, Deserialize)] | ||
| 42 | pub struct PlayerEntry { | ||
| 43 | pub username: String, | ||
| 44 | } | ||
