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
pub mod by_ids;
pub mod by_user;
pub mod one;
pub mod ongoing;

use serde::Serialize;

#[serde_with::skip_serializing_none]
#[derive(Clone, Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Base {
    pub moves: bool,
    pub pgn_in_json: bool,
    pub tags: bool,
    pub clocks: bool,
    pub evals: bool,
    pub accuracy: bool,
    pub opening: bool,
    pub literate: bool,
    pub players: Option<String>,
}

impl Default for Base {
    fn default() -> Self {
        Base {
            moves: true,
            pgn_in_json: false,
            tags: true,
            clocks: false,
            evals: false,
            accuracy: false,
            opening: false,
            literate: false,
            players: None,
        }
    }
}