easydonate_api/v3/types/
user.rs1use serde::{Deserialize, Serialize};
2use crate::util::serde::bool_from_int;
3
4#[derive(Deserialize, Serialize, Debug)]
5pub struct User {
6 pub id: i64,
7 #[serde(deserialize_with = "bool_from_int")]
8 pub dark_mode: bool,
9 pub name: String,
10 pub email: String,
11 pub avatar_url: String,
12 pub permissions: Option<Vec<String>>,
13 pub is_activated: bool,
14 #[serde(deserialize_with = "bool_from_int")]
15 pub notify_payments: bool,
16 pub activated_at: Option<String>,
17 pub last_login: Option<String>,
18 pub balance: i64,
19 pub cashback: i64,
20 #[serde(deserialize_with = "bool_from_int")]
21 pub premium: bool,
22 pub created_at: String,
23 pub updated_at: String,
24 pub username: String,
25 pub surname: Option<String>,
26 pub deleted_at: Option<String>,
27 pub last_seen: String,
28 #[serde(deserialize_with = "bool_from_int")]
29 pub is_guest: bool,
30 #[serde(deserialize_with = "bool_from_int")]
31 pub is_superuser: bool,
32 pub created_ip_address: Option<String>,
33 pub last_ip_address: Option<String>,
34 #[serde(deserialize_with = "bool_from_int")]
35 pub confirm_payouts: bool,
36 pub confirmation_code: Option<i32>, #[serde(deserialize_with = "bool_from_int")]
38 pub confirm_signin: bool,
39 #[serde(deserialize_with = "bool_from_int")]
40 pub payouts_enabled: bool,
41 #[serde(deserialize_with = "bool_from_int")]
42 pub payout_new_schema: bool,
43 pub bank_account: Option<String>
44}