summaryrefslogtreecommitdiff
path: root/protocol/src/lib.rs
blob: 088802f61b6a212e8c9b774a01cdb6309d2a1846 (plain)
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
use serde::{Deserialize, Serialize};
use uuid::Uuid;
pub mod bot;
pub mod bridge_engine;
pub mod card;
pub mod move_result;
pub mod simple_bots;
pub mod contract;
pub mod actions;
pub mod core;

#[derive(Serialize, Deserialize, PartialEq, Eq, Clone, Debug)]
pub struct UserInfo {
    pub username: String,
    pub table: Option<Table>,
}

#[derive(Serialize, Deserialize, PartialEq, Eq, Clone, Debug)]
pub struct Table {
    pub id: Uuid,
}

#[cfg(test)]
mod tests {
    use env_logger::Env;

    pub fn test_setup() {
        dotenv::dotenv().ok();
        let _ = env_logger::Builder::from_env(
            Env::default().default_filter_or("info"),
        )
        .is_test(true)
        .try_init();
    }
}