summaryrefslogtreecommitdiffstats
path: root/src/models/mod.rs
blob: 5cca3ff99cd0ece9ec94077c7abe3169a754e3fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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)]
#[allow(dead_code)]
pub struct Mod {
    pub id: i64,
    pub instance_id: i64,
    pub filename: String,
    pub display_name: Option<String>,
    pub side: String,
    pub accepted: bool,
    pub rejection_reason: Option<String>,
    pub created_at: String,
}

#[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<String>,
    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 whitelist_enabled: bool,
    pub motd: String,
    pub rcon_password: String,
    pub is_active: bool,
    pub created_at: String,
    pub updated_at: String,
}