easydonate_api/v3/types/
server.rs1use serde::{Deserialize, Serialize};
2use crate::util::serde::bool_from_int;
3
4use super::product::Product;
5
6#[derive(Deserialize, Serialize, Debug)]
7pub struct Server {
8 pub id: i64,
9 pub name: String,
10 pub ip: String,
11 pub port: u32,
12 pub version: String,
13 #[serde(deserialize_with = "bool_from_int")]
14 pub is_port_hidden: bool,
15 #[serde(deserialize_with = "bool_from_int")]
16 pub hide_ip: bool,
17 #[serde(deserialize_with = "bool_from_int")]
18 pub is_hidden: bool,
19 pub shop_id: i64,
20 pub created_at: String,
21 pub updated_at: String,
22 pub products: Option<Vec<Product>>
23}